---
title: "Curl Manual"
categories:
- linux
tags:
---

<div id="content">
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org16f2096"><span class="todo TODO">TODO</span> LIst</a>
<ul>
<li><a href="#orgc678b7c"><span class="todo TODO">TODO</span> curl的功能太多，只能暂时将用过的选项记录下来。没用过的选项，保持原文</a></li>
</ul>
</li>
<li><a href="#orgaac60b6">Curl Manual</a>
<ul>
<li><a href="#org3540684">基本语法：</a></li>
<li><a href="#org2ef5021">URL</a></li>
<li><a href="#orgb272e9a">进度条</a></li>
<li><a href="#org10f1da5">OPTIONS</a>
<ul>
<li><a href="#orgf36858b">–abstract-unix-socket &lt;path&gt;</a></li>
<li><a href="#org67bfb2c">–anyauth</a></li>
<li><a href="#org5f7a223">-a, –append</a></li>
<li><a href="#org0dc10af">–basic</a></li>
<li><a href="#org526af58">–cacert &lt;file&gt;</a></li>
<li><a href="#org5110313">–capath &lt;dir&gt;</a></li>
<li><a href="#orgf567653">–cert-status</a></li>
<li><a href="#org4abe172">–cert-type &lt;type&gt;</a></li>
<li><a href="#org0d444bf">–ciphers &lt;list of ciphers&gt;</a></li>
<li><a href="#org5d35492">–compressed-ssh</a></li>
<li><a href="#org95ae5d2">–compressed</a></li>
<li><a href="#org692e288">-K, –config &lt;file&gt;</a></li>
<li><a href="#org2b5b78d">–connect-timeout &lt;seconds&gt;</a></li>
<li><a href="#org0d3702b">–connect-to &lt;HOST1:PORT1:HOST2:PORT2&gt;</a></li>
<li><a href="#orga1733b1">-C, –continue-at &lt;offset&gt;</a></li>
<li><a href="#org5f40157">-c, –cookie-jar &lt;filename&gt;</a></li>
<li><a href="#org6465722">-b, –cookie &lt;data&gt;</a></li>
<li><a href="#org13de510">–create-dirs</a></li>
<li><a href="#orge663d31">–crlf (FTP SMTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).</a></li>
<li><a href="#org370adbe">–crlfile &lt;file&gt;</a></li>
<li><a href="#orge1a6504">–data-ascii &lt;data&gt;</a></li>
<li><a href="#orgf58aa44">–data-binary &lt;data&gt;</a></li>
<li><a href="#org68b84f9">–data-raw &lt;data&gt;</a></li>
<li><a href="#orgd16b7aa">–data-urlencode &lt;data&gt;</a></li>
<li><a href="#org29f74a3">-d, –data &lt;data&gt;</a></li>
<li><a href="#orgf9078ed">–delegation &lt;LEVEL&gt;</a></li>
<li><a href="#org505d963">–digest</a></li>
<li><a href="#orgdb2612e">–disable-eprt</a></li>
<li><a href="#org25d298d">–disable-epsv</a></li>
<li><a href="#org20b3134">-q, –disable</a></li>
<li><a href="#org2d8b209">–dns-interface &lt;interface&gt;</a></li>
<li><a href="#org9b6d1b7">–dns-ipv4-addr &lt;address&gt;</a></li>
<li><a href="#orgf29f56f">–dns-ipv6-addr &lt;address&gt;</a></li>
<li><a href="#org8f4a2f0">–dns-servers &lt;addresses&gt;</a></li>
<li><a href="#orgc280ced">-D, –dump-header &lt;filename&gt;</a></li>
<li><a href="#orgf7ef003">–egd-file &lt;file&gt;</a></li>
<li><a href="#org34b4258">–engine &lt;name&gt;</a></li>
<li><a href="#org2db1708">–expect100-timeout &lt;seconds&gt;</a></li>
<li><a href="#org52c49e1">–fail-early</a></li>
<li><a href="#orgb1d4873">-f, –fail</a></li>
<li><a href="#org1ad3b80">–false-start</a></li>
<li><a href="#org51665d3">–form-string &lt;name=string&gt;</a></li>
<li><a href="#org5e5fa86">-F, –form &lt;name=content&gt;</a></li>
<li><a href="#org79b9a36">–ftp-account &lt;data&gt;</a></li>
<li><a href="#orgcf1d0bf">–ftp-alternative-to-user &lt;command&gt;</a></li>
<li><a href="#orgcb9012d">–ftp-create-dirs</a></li>
<li><a href="#org386cb3a">–ftp-method &lt;method&gt;</a></li>
<li><a href="#org81aaa17">–ftp-pasv</a></li>
<li><a href="#org7bb7cbc">-P, –ftp-port &lt;address&gt;</a></li>
<li><a href="#org6a3c191">–ftp-pret</a></li>
<li><a href="#org19388df">–ftp-skip-pasv-ip</a></li>
<li><a href="#org6b2dad3">–ftp-ssl-ccc-mode &lt;active/passive&gt;</a></li>
<li><a href="#orgc550cc1">–ftp-ssl-ccc</a></li>
<li><a href="#org22fb2b0">–ftp-ssl-control</a></li>
<li><a href="#org2d2e95f">-G, –get</a></li>
<li><a href="#org8898527">-g, –globoff</a></li>
<li><a href="#org1854e07">-I, –head</a></li>
<li><a href="#orgc8e876f">-H, –header &lt;header/@file&gt;</a></li>
<li><a href="#org30f3b5c">-h, –help</a></li>
<li><a href="#orgb834b92">–hostpubmd5 &lt;md5&gt;</a></li>
<li><a href="#org1b283cc">-0, –http1.0</a></li>
<li><a href="#org9c02f8e">–http1.1</a></li>
<li><a href="#org74a0c6e">–http2-prior-knowledge</a></li>
<li><a href="#org9c2a7a7">–http2</a></li>
<li><a href="#org129dc44">–ignore-content-length</a></li>
<li><a href="#org8f0d222">-i, –include</a></li>
<li><a href="#orgcd69441">-k, –insecure</a></li>
<li><a href="#orgf809b88">–interface &lt;name&gt;</a></li>
<li><a href="#org34e7073">-4, –ipv4</a></li>
<li><a href="#orgfa14266">-6, –ipv6</a></li>
<li><a href="#orgfd4ee08">-j, –junk-session-cookies</a></li>
<li><a href="#org2a8f5ed">–keepalive-time &lt;seconds&gt;</a></li>
<li><a href="#orgd80ea62">–key-type &lt;type&gt;</a></li>
<li><a href="#org168549d">–key &lt;key&gt;</a></li>
<li><a href="#org34f354c">–krb &lt;level&gt;</a></li>
<li><a href="#org7425862">–libcurl &lt;file&gt;</a></li>
<li><a href="#orgd5dc3d7">–limit-rate &lt;speed&gt;</a></li>
<li><a href="#org32e344b">-l, –list-only</a></li>
<li><a href="#org0b94d68">–local-port &lt;num/range&gt;</a></li>
<li><a href="#org3398df1">–location-trusted</a></li>
<li><a href="#org9c07b0f">-L, –location</a></li>
<li><a href="#org32c4cbb">–login-options &lt;options&gt;</a></li>
<li><a href="#orge6da8df">–mail-auth &lt;address&gt;</a></li>
<li><a href="#org517e0d6">–mail-from &lt;address&gt;</a></li>
<li><a href="#org2f867fc">–mail-rcpt &lt;address&gt;</a></li>
<li><a href="#org9e122b6">-M, –manual</a></li>
<li><a href="#org944a7e3">–max-filesize &lt;bytes&gt;</a></li>
<li><a href="#org96ff725">–max-redirs &lt;num&gt;</a></li>
<li><a href="#org025408c">-m, –max-time &lt;time&gt;</a></li>
<li><a href="#org7525dc9">–metalink</a></li>
<li><a href="#org2b68e66">–metalink requires that the underlying libcurl was built to support metalink. Added in 7.27.0.</a></li>
<li><a href="#orgb71adaa">–negotiate</a></li>
<li><a href="#orgd1e5c88">–netrc-file &lt;filename&gt;</a></li>
<li><a href="#orgf4435a6">–netrc-optional</a></li>
<li><a href="#orge32e889">-n, –netrc</a></li>
<li><a href="#orgb251abd">-:, –next</a></li>
<li><a href="#org908cd60">–no-alpn</a></li>
<li><a href="#orgee55a7f">-N, –no-buffer</a></li>
<li><a href="#org2f4e505">–no-keepalive</a></li>
<li><a href="#orgd983bc4">–no-npn</a></li>
<li><a href="#org5a94b02">–no-sessionid</a></li>
<li><a href="#org8d899a4">–noproxy &lt;no-proxy-list&gt;</a></li>
<li><a href="#org3af6bac">–ntlm-wb</a></li>
<li><a href="#org962b622">–oauth2-bearer &lt;token&gt;</a></li>
<li><a href="#orgb6ec324">-o, –output &lt;file&gt;</a></li>
<li><a href="#orgca1b747">–pass &lt;phrase&gt;</a></li>
<li><a href="#org1009d13">–path-as-is</a></li>
<li><a href="#orgb5b0829">–pinnedpubkey &lt;hashes&gt;</a></li>
<li><a href="#orgc600c4c">–post301</a></li>
<li><a href="#orgb85758d">–post302</a></li>
<li><a href="#orgdaaee63">–post303</a></li>
<li><a href="#org806bec0">–preproxy [protocol://]host[:port]</a></li>
<li><a href="#orgeb3fe2e">-#, –progress-bar</a></li>
<li><a href="#org971606f">–proto-default &lt;protocol&gt;</a></li>
<li><a href="#org9cbf925">–proto-redir &lt;protocols&gt;</a></li>
<li><a href="#orgbd6b0c3">–proto &lt;protocols&gt;</a></li>
<li><a href="#org8823557">–proxy-anyauth</a></li>
<li><a href="#orgd4d9dc0">–proxy-basic</a></li>
<li><a href="#org44d7565">–proxy-cacert &lt;file&gt;</a></li>
<li><a href="#orge6dc93e">–proxy-capath &lt;dir&gt;</a></li>
<li><a href="#org7ffb247">–proxy-cert-type &lt;type&gt;</a></li>
<li><a href="#org6c6731f">–proxy-cert &lt;cert[:passwd]&gt;</a></li>
<li><a href="#org8178d39">–proxy-ciphers &lt;list&gt;</a></li>
<li><a href="#org2e26398">–proxy-crlfile &lt;file&gt;</a></li>
<li><a href="#orged45f86">–proxy-digest</a></li>
<li><a href="#org9c4ce1a">–proxy-header &lt;header/@file&gt;</a></li>
<li><a href="#org4d4f3f8">–proxy-insecure</a></li>
<li><a href="#orgb98afb6">–proxy-key-type &lt;type&gt;</a></li>
<li><a href="#org17ce3ed">–proxy-key &lt;key&gt;</a></li>
<li><a href="#org1352060">–proxy-negotiate</a></li>
<li><a href="#org0d2b2d9">–proxy-ntlm</a></li>
<li><a href="#org3c3b82b">–proxy-pass &lt;phrase&gt;</a></li>
<li><a href="#org21ad840">–proxy-service-name &lt;name&gt;</a></li>
<li><a href="#org67853de">–proxy-ssl-allow-beast</a></li>
<li><a href="#org7683f86">–proxy-tlsauthtype &lt;type&gt;</a></li>
<li><a href="#org018bead">–proxy-tlspassword &lt;string&gt;</a></li>
<li><a href="#org9c0f1c4">–proxy-tlsuser &lt;name&gt;</a></li>
<li><a href="#orgc116566">–proxy-tlsv1</a></li>
<li><a href="#org2c924a2">-U, –proxy-user &lt;user:password&gt;</a></li>
<li><a href="#orge79b1aa">-x, –proxy [protocol://]host[:port]</a></li>
<li><a href="#org93ad1a4">–proxy1.0 &lt;host[:port]&gt;</a></li>
<li><a href="#org8196bcc">-p, –proxytunnel</a></li>
<li><a href="#org5568d75">–pubkey &lt;key&gt;</a></li>
<li><a href="#orgb242f21">-Q, –quote</a></li>
<li><a href="#orge8b94cf">–random-file &lt;file&gt;</a></li>
<li><a href="#org64e66df">-r, –range &lt;range&gt;</a></li>
<li><a href="#org4b3bf27">–raw  (HTTP) When used, it disables all internal HTTP decoding of content or transfer encodings and instead makes them passed on unaltered, raw.</a></li>
<li><a href="#org1a6c48d">-e, –referer &lt;URL&gt;</a></li>
<li><a href="#orgb04296e">-J, –remote-header-name</a></li>
<li><a href="#orgff8054e">-O, –remote-name</a></li>
<li><a href="#orgcd3e423">-R, –remote-time</a></li>
<li><a href="#org583e2ea">–request-target</a></li>
<li><a href="#org662ff20">-X, –request &lt;command&gt;</a></li>
<li><a href="#orgf397270">–resolve &lt;host:port:address&gt;</a></li>
<li><a href="#orga43844e">–retry-connrefused</a></li>
<li><a href="#orgee4e6e2">–retry-delay &lt;seconds&gt;</a></li>
<li><a href="#org90f4734">–retry-max-time &lt;seconds&gt;</a></li>
<li><a href="#org1cbb567">–retry &lt;num&gt;</a></li>
<li><a href="#org0e75c65">–sasl-ir</a></li>
<li><a href="#org07cd0a6">–service-name &lt;name&gt;</a></li>
<li><a href="#org30fa14b">-S, –show-error</a></li>
<li><a href="#orgc8ea4f5">–socks4 &lt;host[:port]&gt;</a></li>
<li><a href="#org389ffe7">–socks4a &lt;host[:port]&gt;</a></li>
<li><a href="#org42bde48">–socks5-basic</a></li>
<li><a href="#org6d2c430">–socks5-gssapi-nec</a></li>
<li><a href="#orge29183f">–socks5-gssapi-service &lt;name&gt;</a></li>
<li><a href="#org6e0c138">–socks5-gssapi</a></li>
<li><a href="#orgf8e4496">–socks5-hostname &lt;host[:port]&gt;</a></li>
<li><a href="#org33fe89b">–socks5 &lt;host[:port]&gt;</a></li>
<li><a href="#org6a6524f">-Y, –speed-limit &lt;speed&gt;</a></li>
<li><a href="#org812eff7">-y, –speed-time &lt;seconds&gt;</a></li>
<li><a href="#orga840291">–ssl-allow-beast</a></li>
<li><a href="#orgf5dc25d">–ssl-no-revoke</a></li>
<li><a href="#orgf5aedf0">–ssl-reqd</a></li>
<li><a href="#org01ac41e">–ssl  (FTP  IMAP POP3 SMTP) Try to use SSL/TLS for the connection.  Reverts to a non-secure connection if the server doesn't support SSL/TLS.  See also –ftp-ssl-con‐</a></li>
<li><a href="#org33f955f">-2, –sslv2</a></li>
<li><a href="#org408f265">-3, –sslv3</a></li>
<li><a href="#org7e164be">–stderr</a></li>
<li><a href="#org7d5f973">–suppress-connect-headers</a></li>
<li><a href="#org2292130">–tcp-fastopen</a></li>
<li><a href="#org5394c14">–tcp-nodelay</a></li>
<li><a href="#orgaa774d0">-t, –telnet-option &lt;opt=val&gt;</a></li>
<li><a href="#orgff83f50">–tftp-blksize &lt;value&gt;</a></li>
<li><a href="#org09b7d8f">–tftp-no-options</a></li>
<li><a href="#orgad7794f">-z, –time-cond &lt;time&gt;</a></li>
<li><a href="#org3ec602f">–tls-max &lt;VERSION&gt;</a></li>
<li><a href="#org29d3c92">–tlsauthtype &lt;type&gt;</a></li>
<li><a href="#org3f2e90b">–tlspassword</a></li>
<li><a href="#org06d506a">–tlsuser &lt;name&gt;</a></li>
<li><a href="#org42ea50e">–tlsv1.0</a></li>
<li><a href="#orga31b301">–tlsv1.1</a></li>
<li><a href="#org0f6c91f">–tlsv1.2</a></li>
<li><a href="#orge7363f0">–tlsv1.3</a></li>
<li><a href="#org3cddbef">-1, –tlsv1</a></li>
<li><a href="#org9ce38ea">–tr-encoding</a></li>
<li><a href="#org64b3227">–trace-ascii &lt;file&gt;</a></li>
<li><a href="#orgde3fcb1">–trace-time</a></li>
<li><a href="#org78c017d">–trace &lt;file&gt;</a></li>
<li><a href="#orgd12ec15">–unix-socket &lt;path&gt;</a></li>
<li><a href="#org69963a9">-T, –upload-file &lt;file&gt;</a></li>
<li><a href="#org664a462">–url &lt;url&gt;</a></li>
<li><a href="#org0aef12c">-B, –use-ascii</a></li>
<li><a href="#org6457c74">-A, –user-agent &lt;name&gt;</a></li>
<li><a href="#org21dc71b">-u, –user &lt;user:password&gt;</a></li>
<li><a href="#org7e3e82e">-v, –verbose</a></li>
<li><a href="#orgb10f801">-w, –write-out &lt;format&gt;</a></li>
</ul>
</li>
<li><a href="#orgb7c285a">相关的文件</a></li>
<li><a href="#orgb4eb049">环境变量</a></li>
<li><a href="#orgcfcf2fc">PROXY PROTOCOL PREFIXES</a></li>
<li><a href="#orgda216e6">EXIT CODES</a></li>
<li><a href="#orgd7c5e01">AUTHORS / CONTRIBUTORS</a></li>
<li><a href="#orga12b23c">WWW</a></li>
<li><a href="#org3d1dd79">SEE ALSO</a></li>
<li><a href="#org10887d3">Footer</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="outline-2" id="outline-container-org16f2096">
<h2 id="org16f2096"><span class="todo TODO">TODO</span> LIst</h2>
<div class="outline-text-2" id="text-org16f2096">
</div>
<div class="outline-3" id="outline-container-orgc678b7c">
<h3 id="orgc678b7c"><span class="todo TODO">TODO</span> curl的功能太多，只能暂时将用过的选项记录下来。没用过的选项，保持原文</h3>
</div>
</div>
<div class="outline-2" id="outline-container-orgaac60b6">
<h2 id="orgaac60b6">Curl Manual</h2>
<div class="outline-text-2" id="text-orgaac60b6">
<p>
curl支持的协议有：DICT, FILE, FTP, FTPS, COPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET, TFTP。
这个命令被设计成无用户交互的。
</p>
<p>
curl还支持各种有用的诸如proxy, authentication, FTP上传，HTTP post，SSL，cookie，文件传输，Metalink等功能，数量非常多。
</p>
<p>
curl使用libcurl驱动。
</p>
</div>
<div class="outline-3" id="outline-container-org3540684">
<h3 id="org3540684">基本语法：</h3>
<div class="outline-text-3" id="text-org3540684">
<p>
{% raw %} curl [option] [URI...] {% endraw %}
</p>
</div>
</div>
<div class="outline-3" id="outline-container-org2ef5021">
<h3 id="org2ef5021">URL</h3>
<div class="outline-text-3" id="text-org2ef5021">
<p>
URL的语法与作用的协议有关，详细的描述在RFC 3986。
</p>
<p>
指定多个URL，或多个URL片段，使用大括号：
{% raw %} http://site.{one,two,three}.com {% endraw %}
或者使用中括号：
</p>
<ul class="org-ul">
<li>{% raw %} ftp://ftp.example.com/file[1-100].txt {% endraw %} 中括号内作用数字范围</li>
<li>{% raw %} ftp://ftp.example.com/file[001-100].txt {% endraw %}    和上面那个相比，这个数字前面的0会被保留</li>
<li>{% raw %} ftp://ftp.example.com/file[a-z].txt {% endraw %} 作用字母范围</li>
<li>{% raw %} http://example.com/file[1-100:10].txt {% endraw %} 范围内指定步进</li>
<li>{% raw %} http://example.com/file[a-z:2].txt {% endraw %} 字母也能指定步进</li>
</ul>
<p>
Nested sequences are not supported, but you can use several ones next to each other:
</p>
<ul class="org-ul">
<li>{% raw %} http://example.com/archive[1996-1999]/vol[1-4]/part{a,b,c}.html {% endraw %}</li>
</ul>
<p>
也能在命令行中指定多个URL，它们将以指定的顺序被执行。
</p>
<p>
在命令行中使用 [] 或 {}，需要用双引号将整个URL引起来，否则shell会对这些符号做特殊的处理。（Shell Script中的括号有特殊的用法）。其他的字符也需要注意，例如 '&amp;', '?', '*'。
</p>
<p>
Provide the IPv6 zone index in the URL with an escaped percentage sign and the interface name. Like in
</p>
<p>
{% raw %} http://[fe80::3%25eth0]/ {% endraw %}
</p>
<p>
如果URL中没有 protocol:// 部分，curl会尝试自动判断URL的协议。默认是HTTP，通过host常用的前缀判断。
例如：如是请求的host是ftp.xxx.com，curl就判断为FTP协议。
</p>
<p>
curl会尽量使用你传递给它的URL，而不会检其中是否有语法错误。
</p>
<p>
当传输多个文件的时候，curl会尝试复用连接，因此，从同一个服务器上获取多个文件的时候，不会出现多次连接/握手。
通过这种方式提高速度。当然是在同一条命令中，其他的命令不会共享这些连接。
</p>
</div>
</div>
<div class="outline-3" id="outline-container-orgb272e9a">
<h3 id="orgb272e9a">进度条</h3>
<div class="outline-text-3" id="text-orgb272e9a">
<p>
curl一般会显示一个进度条，传输的数据量，速度，估计的剩余时间等被显示在上面。
显示速度的时候，单位是k, M, G, T, P，这些是按照1024计算的，例如 1k = 1024 bytes, 1M = 1048576 bytes。
</p>
<p>
curl默认是将结果数据写到控制台上，所以如果一个操作要写数据到控制台上，则进度条被禁用。否则进度条显示的信息和数据混到一起了。
</p>
<p>
如果想为POST和PUT请求显示进度条，你需要将响应自定向到文件，使用shell的重定向或-o –output之类的。
</p>
<p>
FTP上传的情况与上面的不一样。FTP上传不会向控制台输出任何数据。
</p>
<p>
上面说的“进度条”，并不是一个条条，而是一堆信息的显示。如果你更喜欢条状的进度显示，使用 -# –progress-bar 选项。
</p>
<p>
使用 –silent 选项禁用进度显示。
</p>
</div>
</div>
<div class="outline-3" id="outline-container-org10f1da5">
<h3 id="org10f1da5">OPTIONS</h3>
<div class="outline-text-3" id="text-org10f1da5">
<p>
选项以一个横线或两个横线开始，许多选项后面需要额外的值。
</p>
<p>
单横线形式的选项，例如-d，选项和值之间既能有空格也能省略。但是推荐加上空格。
</p>
<p>
两个横线的选项，例如–data，选项和值之间必须有空格。
</p>
<p>
简短形式的选项，如果后面不需要跟一个值，则它们能够写在一起，例如 -O -L -v三个选项能够写成 -OLv。
</p>
<p>
所有开关（boolean）选项，通过 –option 表示开启，–no-option表示关闭。也就是在选项的名称的前面加上 {% raw %} no- {% endraw %} 。
在这份列表中，我们一般只显示他们的 –option 版本。
</p>
<p>
(This concept with –no options was added in 7.19.0. Previously most options were toggled on/off on repeated use of the same command line option.)
</p>
</div>
<div class="outline-4" id="outline-container-orgf36858b">
<h4 id="orgf36858b">–abstract-unix-socket &lt;path&gt;</h4>
<div class="outline-text-4" id="text-orgf36858b">
<p>
(HTTP) Connect through an abstract Unix domain socket, instead of using the network.  Note: netstat shows the path of an abstract socket prefixed with '@', however the &lt;path&gt; argument should not have this leading character.
</p>
<p>
Added in 7.53.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org67bfb2c">
<h4 id="org67bfb2c">–anyauth</h4>
<div class="outline-text-4" id="text-org67bfb2c">
<p>
(HTTP)  Tells  curl  to figure out authentication method by itself, and use the most secure one the remote site claims to support. This is done by first doing a
request and checking the response-headers, thus possibly inducing an extra network round-trip. This is used instead of setting a specific authentication method,
which you can do with –basic, –digest, –ntlm, and –negotiate.
</p>
<p>
Using  –anyauth  is not recommended if you do uploads from stdin, since it may require data to be sent twice and then the client must be able to rewind. If the
need should arise when uploading from stdin, the upload operation will fail.
</p>
<p>
Used together with -u, –user.
</p>
<p>
See also –proxy-anyauth and –basic and –digest.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org5f7a223">
<h4 id="org5f7a223">-a, –append</h4>
<div class="outline-text-4" id="text-org5f7a223">
<p>
(FTP SFTP) When used in an upload, this makes curl append to the target file instead of overwriting it. If the remote file doesn't exist, it  will  be  created.
Note that this flag is ignored by some SFTP servers (including OpenSSH).
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org0dc10af">
<h4 id="org0dc10af">–basic</h4>
<div class="outline-text-4" id="text-org0dc10af">
<p>
(HTTP) 使用HTTP Basic认证方式请求远程服务器。
这是默认的，除非是用于覆盖前面设置的其他的认证方式（例如–ntlm, –digest, –negotiate），否则指定这个选项是没有意义的。
</p>
<p>
与 -u –user 一起使用。
</p>
<p>
See also –proxy-basic.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org526af58">
<h4 id="org526af58">–cacert &lt;file&gt;</h4>
<div class="outline-text-4" id="text-org526af58">
<p>
(TLS) Tells curl to use the specified certificate file to verify the peer. The file may contain multiple CA certificates. The certificate(s) must be in PEM for‐
mat. Normally curl is built to use a default file for this, so this option is typically used to alter that default file.
</p>
<p>
curl  recognizes the environment variable named 'CURL_CA_BUNDLE' if it is set, and uses the given path as a path to a CA cert bundle. This option overrides that
variable.
</p>
<p>
The windows version of curl will automatically look for a CA certs file named ´curl-ca-bundle.crt´, either in the same directory as curl.exe, or in the  Current
Working Directory, or in any folder along your PATH.
</p>
<p>
If curl is built against the NSS SSL library, the NSS PEM PKCS#11 module (libnsspem.so) needs to be available for this option to work properly.
</p>
<p>
(iOS  and  macOS only) If curl is built against Secure Transport, then this option is supported for backward compatibility with other SSL engines, but it should
not be set. If the option is not set, then curl will use the certificates in the system and user Keychain to verify the peer, which is the preferred  method  of
verifying the peer's certificate chain.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org5110313">
<h4 id="org5110313">–capath &lt;dir&gt;</h4>
<div class="outline-text-4" id="text-org5110313">
<p>
(TLS)  Tells  curl  to  use  the  specified  certificate  directory  to  verify  the  peer.  Multiple  paths  can  be provided by separating them with ":" (e.g.
"path1:path2:path3"). The certificates must be in PEM format, and if curl is built against OpenSSL, the directory must have been processed  using  the  c_rehash
utility  supplied  with OpenSSL. Using –capath can allow OpenSSL-powered curl to make SSL-connections much more efficiently than using –cacert if the –cacert
file contains many CA certificates.
</p>
<p>
If this option is set, the default capath value will be ignored, and if it is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgf567653">
<h4 id="orgf567653">–cert-status</h4>
<div class="outline-text-4" id="text-orgf567653">
<p>
(TLS) Tells curl to verify the status of the server certificate by using the Certificate Status Request (aka. OCSP stapling) TLS extension.
</p>
<p>
If this option is enabled and the server sends an invalid (e.g. expired) response, if the response suggests that the server certificate has been revoked, or  no
response at all is received, the verification fails.
</p>
<p>
This is currently only implemented in the OpenSSL, GnuTLS and NSS backends.
</p>
<p>
Added in 7.41.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org4abe172">
<h4 id="org4abe172">–cert-type &lt;type&gt;</h4>
<div class="outline-text-4" id="text-org4abe172">
<p>
(TLS) Tells curl what certificate type the provided certificate is in. PEM, DER and ENG are recognized types.  If not specified, PEM is assumed.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
See also -E, –cert and –key and –key-type.
</p>
<p>
-E, –cert &lt;certificate[:password]&gt;
(TLS)  Tells  curl  to  use the specified client certificate file when getting a file with HTTPS, FTPS or another SSL-based protocol. The certificate must be in
PKCS#12 format if using Secure Transport, or PEM format if using any other engine.  If the optional password isn't specified, it will be queried for on the ter‐
minal.  Note  that this option assumes a "certificate" file that is the private key and the client certificate concatenated! See -E, –cert and –key to specify
them independently.
</p>
<p>
If curl is built against the NSS SSL library then this option can tell curl the nickname of the certificate to use within the NSS database defined by the  envi‐
ronment  variable SSL_DIR (or by default <i>etc/pki/nssdb). If the NSS PEM PKCS#11 module (libnsspem.so) is available then PEM files may be loaded. If you want to
use a file from the current directory, please precede it with ".</i>" prefix, in order to avoid confusion with a nickname.  If the nickname contains ":", it  needs
to be preceded by "\" so that it is not recognized as password delimiter.  If the nickname contains "\", it needs to be escaped as "\\" so that it is not recog‐
nized as an escape character.
</p>
<p>
(iOS and macOS only) If curl is built against Secure Transport, then the certificate string can either be the name of a certificate/private key in the system or
user  keychain,  or the path to a PKCS#12-encoded certificate and private key. If you want to use a file from the current directory, please precede it with "./"
prefix, in order to avoid confusion with a nickname.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
See also –cert-type and –key and –key-type.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org0d444bf">
<h4 id="org0d444bf">–ciphers &lt;list of ciphers&gt;</h4>
<div class="outline-text-4" id="text-org0d444bf">
<p>
(TLS) Specifies which ciphers to use in the connection. The list of ciphers must specify valid ciphers. Read up on SSL cipher list details on this URL:
</p>
<p>
<a href="https://curl.haxx.se/docs/ssl-ciphers.html">https://curl.haxx.se/docs/ssl-ciphers.html</a>
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org5d35492">
<h4 id="org5d35492">–compressed-ssh</h4>
<div class="outline-text-4" id="text-org5d35492">
<p>
(SCP SFTP) Enables built-in SSH compression.  This is a request, not an order; the server may or may not do it.
</p>
<p>
Added in 7.56.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org95ae5d2">
<h4 id="org95ae5d2">–compressed</h4>
<div class="outline-text-4" id="text-org95ae5d2">
<p>
(HTTP) Request a compressed response using one of the algorithms curl supports, and save the uncompressed document.  If this option is used and the server sends
an unsupported encoding, curl will report an error.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org692e288">
<h4 id="org692e288">-K, –config &lt;file&gt;</h4>
<div class="outline-text-4" id="text-org692e288">
<p>
Specify a text file to read curl arguments from. The command line arguments found in the text file will be used as if they were provided on the command line.
</p>
<p>
Options  and  their parameters must be specified on the same line in the file, separated by whitespace, colon, or the equals sign. Long option names can option‐
ally be given in the config file without the initial double dashes and if so, the colon or equals characters can be used as separators. If the option is  speci‐
fied with one or two dashes, there can be no colon or equals character between the option and its parameter.
</p>
<p>
If the parameter is to contain whitespace, the parameter must be enclosed within quotes. Within double quotes, the following escape sequences are available: \\,
\", \t, \n, \r and \v. A backslash preceding any other letter is ignored. If the first column of a config line is a '#' character, the rest of the line will  be
treated as a comment. Only write one option per physical line in the config file.
</p>
<p>
Specify the filename to -K, –config as '-' to make curl read the file from stdin.
</p>
<p>
Note  that to be able to specify a URL in the config file, you need to specify it using the –url option, and not by simply writing the URL on its own line. So,
it could look similar to this:
</p>
<p>
url = "<a href="https://curl.haxx.se/docs/">https://curl.haxx.se/docs/</a>"
</p>
<p>
When curl is invoked, it (unless -q, –disable is used) checks for a default config file and uses it if found. The default config file is  checked  for  in  the
following places in this order:
</p>
<ol class="org-ol">
<li>curl  tries to find the "home dir": It first checks for the CURL_HOME and then the HOME environment variables. Failing that, it uses getpwuid() on Unix-like</li>
</ol>
<p>
systems (which returns the home dir given the current user in your system). On Windows, it then checks for the APPDATA variable, or as a last resort the '%USER‐
PROFILE%\Application Data'.
</p>
<ol class="org-ol">
<li>On windows, if there is no _curlrc file in the home dir, it checks for one in the same dir the curl executable is placed. On Unix-like systems, it will sim‐</li>
</ol>
<p>
ply try to load .curlrc from the determined home dir.
</p>
<p>
url = "example.com"
output = "curlhere.html"
user-agent = "superagent/1.0"
</p>
<p>
url = "example.com/docs/manpage.html"
-O
referer = "<a href="http://nowhereatall.example.com/">http://nowhereatall.example.com/</a>"
</p>
<p>
This option can be used multiple times to load multiple config files.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org2b5b78d">
<h4 id="org2b5b78d">–connect-timeout &lt;seconds&gt;</h4>
<div class="outline-text-4" id="text-org2b5b78d">
<p>
Maximum time in seconds that you allow curl's connection to take.  This only limits the connection phase, so if curl connects within the given  period  it  will
continue - if not it will exit.  Since version 7.32.0, this option accepts decimal values.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
See also -m, –max-time.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org0d3702b">
<h4 id="org0d3702b">–connect-to &lt;HOST1:PORT1:HOST2:PORT2&gt;</h4>
<div class="outline-text-4" id="text-org0d3702b">
<p>
For  a  request  to the given HOST1:PORT1 pair, connect to HOST2:PORT2 instead.  This option is suitable to direct requests at a specific server, e.g. at a spe‐
cific cluster node in a cluster of servers. This option is only used to establish the network connection. It does NOT affect the hostname/port that is used  for
TLS/SSL (e.g. SNI, certificate verification) or for the application protocols. "HOST1" and "PORT1" may be the empty string, meaning "any host/port". "HOST2" and
"PORT2" may also be the empty string, meaning "use the request's original host/port".
</p>
<p>
A "host" specified to this option is compared as a string, so it needs to match the name used in request URL. It can be either numerical such as "127.0.0.1"  or
the full host name such as "example.org".
</p>
<p>
This option can be used many times to add many connect rules.
</p>
<p>
See also –resolve and -H, –header. Added in 7.49.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orga1733b1">
<h4 id="orga1733b1">-C, –continue-at &lt;offset&gt;</h4>
<div class="outline-text-4" id="text-orga1733b1">
<p>
Continue/Resume a previous file transfer at the given offset. The given offset is the exact number of bytes that will be skipped, counting from the beginning of
the source file before it is transferred to the destination.  If used with uploads, the FTP server command SIZE will not be used by curl.
</p>
<p>
Use "-C -" to tell curl to automatically find out where/how to resume the transfer. It then uses the given output/input files to figure that out.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
See also -r, –range.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org5f40157">
<h4 id="org5f40157">-c, –cookie-jar &lt;filename&gt;</h4>
<div class="outline-text-4" id="text-org5f40157">
<p>
(HTTP) Specify to which file you want curl to write all cookies after a completed operation. Curl writes all cookies from its in-memory cookie  storage  to  the
given  file  at  the end of operations. If no cookies are known, no data will be written. The file will be written using the Netscape cookie file format. If you
set the file name to a single dash, "-", the cookies will be written to stdout.
</p>
<p>
This command line option will activate the cookie engine that makes curl record and use cookies. Another way to activate it is to use the -b, –cookie option.
</p>
<p>
If the cookie jar can't be created or written to, the whole curl operation won't fail or even report an error clearly. Using -v, –verbose will  get  a  warning
displayed, but that is the only visible feedback you get about this possibly lethal situation.
</p>
<p>
If this option is used several times, the last specified file name will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org6465722">
<h4 id="org6465722">-b, –cookie &lt;data&gt;</h4>
<div class="outline-text-4" id="text-org6465722">
<p>
(HTTP)  Pass  the data to the HTTP server in the Cookie header. It is supposedly the data previously received from the server in a "Set-Cookie:" line.  The data
should be in the format "NAME1=VALUE1; NAME2=VALUE2".
</p>
<p>
If no '=' symbol is used in the argument, it is instead treated as a filename to read previously stored cookie from.  This  option  also  activates  the  cookie
engine  which  will  make curl record incoming cookies, which may be handy if you're using this in combination with the -L, –location option or do multiple URL
transfers on the same invoke.
</p>
<p>
The file format of the file to read cookies from should be plain HTTP headers (Set-Cookie style) or the Netscape/Mozilla cookie file format.
</p>
<p>
The file specified with -b, –cookie is only used as input. No cookies will be written to the file. To store cookies, use the -c, –cookie-jar option.
</p>
<p>
Exercise caution if you are using this option and multiple transfers may occur.  If you use the NAME1=VALUE1; format, or in a file use the Set-Cookie format and
don't  specify a domain, then the cookie is sent for any domain (even after redirects are followed) and cannot be modified by a server-set cookie. If the cookie
engine is enabled and a server sets a cookie of the same name then both will be sent on a future transfer to that server, likely  not  what  you  intended.   To
address these issues set a domain in Set-Cookie (doing that will include sub domains) or use the Netscape format.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
Users  very  often  want  to both read cookies from a file and write updated cookies back to a file, so using both -b, –cookie and -c, –cookie-jar in the same
command line is common.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org13de510">
<h4 id="org13de510">–create-dirs</h4>
<div class="outline-text-4" id="text-org13de510">
<p>
当与 -o –output 选项一起使用的时候，curl会创建-o –output所需要的目录树。如果–output中没有目录，或目录已存在，则不会创建。
</p>
<p>
如果希望在FTP或SFTP协议中创建目录，则使用 –ftp-create-dirs
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orge663d31">
<h4 id="orge663d31">–crlf (FTP SMTP) Convert LF to CRLF in upload. Useful for MVS (OS/390).</h4>
<div class="outline-text-4" id="text-orge663d31">
<p>
(SMTP added in 7.40.0)
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org370adbe">
<h4 id="org370adbe">–crlfile &lt;file&gt;</h4>
<div class="outline-text-4" id="text-org370adbe">
<p>
(TLS) Provide a file using PEM format with a Certificate Revocation List that may specify peer certificates that are to be considered revoked.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
Added in 7.19.7.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orge1a6504">
<h4 id="orge1a6504">–data-ascii &lt;data&gt;</h4>
<div class="outline-text-4" id="text-orge1a6504">
<p>
(HTTP)  -d, –data 的别名。
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgf58aa44">
<h4 id="orgf58aa44">–data-binary &lt;data&gt;</h4>
<div class="outline-text-4" id="text-orgf58aa44">
<p>
(HTTP) This posts data exactly as specified with no extra processing whatsoever.
</p>
<p>
If  you  start  the data with the letter @, the rest should be a filename.  Data is posted in a similar manner as -d, –data does, except that newlines and carriage returns are preserved and conversions are never done.
</p>
<p>
If this option is used several times, the ones following the first will append data as described in -d, –data.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org68b84f9">
<h4 id="org68b84f9">–data-raw &lt;data&gt;</h4>
<div class="outline-text-4" id="text-org68b84f9">
<p>
(HTTP) 与 -d, –data 类似，但是不会特殊对待'@'符号。
</p>
<p>
See also -d, –data. Added in 7.43.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgd16b7aa">
<h4 id="orgd16b7aa">–data-urlencode &lt;data&gt;</h4>
<div class="outline-text-4" id="text-orgd16b7aa">
<p>
(HTTP) 与 -d, –data 类似，除了，这个选项将进行URL-encoding。
</p>
<p>
为了与CGI保持兼容，&lt;data&gt;部分应该以name开始，再接一个分隔符，然后是内容定义。&lt;data&gt;部分能够使用以下几种格式：
</p>
</div>
<ul class="org-ul">
<li><a id="orge62e23d"></a>content<br/>
<div class="outline-text-5" id="text-orge62e23d">
<p>
curl将对content进行URL-encode。需要注意content不能包含'=' '@'符号，不然就变成下面的格式了。
This  will  make  curl URL-encode the content and pass that on. Just be careful so that the content doesn't contain any = or @ symbols, as that will then
make the syntax match one of the other cases below!
</p>
</div>
</li>
<li><a id="org6a83c0e"></a>=content<br/>
<div class="outline-text-5" id="text-org6a83c0e">
<p>
curl将对content进行URL-encode。前面的'='符号不会被包含在数据中。
</p>
</div>
</li>
<li><a id="org40be4ec"></a>name=content<br/>
<div class="outline-text-5" id="text-org40be4ec">
<p>
curl将对content进行URL-encode。请注意name部分应当是已经URL-encode的
</p>
</div>
</li>
<li><a id="orgd026506"></a>@filename<br/>
<div class="outline-text-5" id="text-orgd026506">
<p>
curl将加载指定的文件（包括其中的换行符）作为数据，然后对数据进行URL-encode。
</p>
</div>
</li>
<li><a id="org45efb1c"></a>name@filename<br/>
<div class="outline-text-5" id="text-org45efb1c">
<p>
curl将加载指定的文件（包括其中的换行符）作为数据，然后执行URL-encode。name部分被追加在前面，结果就是 <span class="underline">name=urlencoded-file-content</span> 。
</p>
<p>
name必须是已经url-encode好了的。
</p>
<p>
See also -d, –data and –data-raw. Added in 7.18.0.
</p>
</div>
</li>
</ul>
</div>
<div class="outline-4" id="outline-container-org29f74a3">
<h4 id="org29f74a3">-d, –data &lt;data&gt;</h4>
<div class="outline-text-4" id="text-org29f74a3">
<p>
(HTTP)通过POST的方式，向服务器发送数据。与用户填写HTML表单然后点提交的方式是一样的（content-type=application/x-www-form-urlencoded）。
等同于 -F –form。
</p>
<p>
与 –data-raw 几乎是相同的，但是 –data-raw 不会对'@'符号做特别的处理。
</p>
<p>
要传递纯的二进制数据，应当使用 –data-binary 。
要URL-encode数据，考虑使用 –data-urlencode 。
</p>
<p>
如果这些选项在同一条命令中被使用多次，数据将被合并到一起，以'&amp;'分隔。例如：
'-d name=daniel -d skill=lousy' ，传输的数据将是 'name=daniel&amp;skill=lousy'.
</p>
<p>
如果data是以'@'符号开始的，后面应该跟一个文件名，数据将从文件中读取。或者是 '-' ，数据将从stdin中读入。
也能指定多个文件。使用这种方式，回车和换行符将被移除。
</p>
<p>
如果不希望 '@' 符号被特别对待，使用 –data-raw 。
</p>
<p>
See also –data-binary and –data-urlencode and –data-raw. This option overrides -F, –form and -I, –head and –upload.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgf9078ed">
<h4 id="orgf9078ed">–delegation &lt;LEVEL&gt;</h4>
<div class="outline-text-4" id="text-orgf9078ed">
<p>
(GSS/kerberos) Set LEVEL to tell the server what it is allowed to delegate when it comes to user credentials.
</p>
<p>
none   Don't allow any delegation.
</p>
<p>
policy Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos service ticket, which is a matter of realm policy.
</p>
<p>
always Unconditionally allow the server to delegate.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org505d963">
<h4 id="org505d963">–digest</h4>
<div class="outline-text-4" id="text-org505d963">
<p>
(HTTP) Enables HTTP Digest authentication. This is an authentication scheme that prevents the password from being sent over the wire in clear text. Use this  in
combination with the normal -u, –user option to set user name and password.
</p>
<p>
If this option is used several times, only the first one is used.
</p>
<p>
See also -u, –user and –proxy-digest and –anyauth. This option overrides –basic and –ntlm and –negotiate.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgdb2612e">
<h4 id="orgdb2612e">–disable-eprt</h4>
<div class="outline-text-4" id="text-orgdb2612e">
<p>
(FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing active FTP transfers. Curl will normally always first attempt to use EPRT, then LPRT
before using PORT, but with this option, it will use PORT right away. EPRT and LPRT are extensions to the original  FTP  protocol,  and  may  not  work  on  all
servers, but they enable more functionality in a better way than the traditional PORT command.
</p>
<p>
–eprt can be used to explicitly enable EPRT again and –no-eprt is an alias for –disable-eprt.
</p>
<p>
If the server is accessed using IPv6, this option will have no effect as EPRT is necessary then.
</p>
<p>
Disabling EPRT only changes the active behavior. If you want to switch to passive mode you need to not use -P, –ftp-port or force it with –ftp-pasv.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org25d298d">
<h4 id="org25d298d">–disable-epsv</h4>
<div class="outline-text-4" id="text-org25d298d">
<p>
(FTP)  (FTP) Tell curl to disable the use of the EPSV command when doing passive FTP transfers. Curl will normally always first attempt to use EPSV before PASV,
but with this option, it will not try using EPSV.
</p>
<p>
–epsv can be used to explicitly enable EPSV again and –no-epsv is an alias for –disable-epsv.
</p>
<p>
If the server is an IPv6 host, this option will have no effect as EPSV is necessary then.
</p>
<p>
Disabling EPSV only changes the passive behavior. If you want to switch to active mode you need to use -P, –ftp-port.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org20b3134">
<h4 id="org20b3134">-q, –disable</h4>
<div class="outline-text-4" id="text-org20b3134">
<p>
If used as the first parameter on the command line, the curlrc config file will not be read and used. See the -K, –config for details  on  the  default  config
file search path.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org2d8b209">
<h4 id="org2d8b209">–dns-interface &lt;interface&gt;</h4>
<div class="outline-text-4" id="text-org2d8b209">
<p>
(DNS)  Tell curl to send outgoing DNS requests through &lt;interface&gt;. This option is a counterpart to –interface (which does not affect DNS). The supplied string
must be an interface name (not an address).
</p>
<p>
See also –dns-ipv4-addr and –dns-ipv6-addr. –dns-interface requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org9b6d1b7">
<h4 id="org9b6d1b7">–dns-ipv4-addr &lt;address&gt;</h4>
<div class="outline-text-4" id="text-org9b6d1b7">
<p>
(DNS) Tell curl to bind to &lt;ip-address&gt; when making IPv4 DNS requests, so that the DNS requests originate from this address. The argument  should  be  a  single
IPv4 address.
</p>
<p>
See also –dns-interface and –dns-ipv6-addr. –dns-ipv4-addr requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgf29f56f">
<h4 id="orgf29f56f">–dns-ipv6-addr &lt;address&gt;</h4>
<div class="outline-text-4" id="text-orgf29f56f">
<p>
(DNS)  Tell  curl  to  bind to &lt;ip-address&gt; when making IPv6 DNS requests, so that the DNS requests originate from this address. The argument should be a single
IPv6 address.
</p>
<p>
See also –dns-interface and –dns-ipv4-addr. –dns-ipv6-addr requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org8f4a2f0">
<h4 id="org8f4a2f0">–dns-servers &lt;addresses&gt;</h4>
<div class="outline-text-4" id="text-org8f4a2f0">
<p>
Set the list of DNS servers to be used instead of the system default.  The list of IP addresses should be separated with commas. Port numbers may  also  option‐
ally be given as :&lt;port-number&gt; after each IP address.
</p>
<p>
–dns-servers requires that the underlying libcurl was built to support c-ares. Added in 7.33.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgc280ced">
<h4 id="orgc280ced">-D, –dump-header &lt;filename&gt;</h4>
<div class="outline-text-4" id="text-orgc280ced">
<p>
(HTTP FTP) Write the received protocol headers to the specified file.
</p>
<p>
This  option  is  handy  to  use when you want to store the headers that an HTTP site sends to you. Cookies from the headers could then be read in a second curl
invocation by using the -b, –cookie option! The -c, –cookie-jar option is a better way to store cookies.
</p>
<p>
When used in FTP, the FTP server response lines are considered being "headers" and thus are saved there.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
See also -o, –output.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgf7ef003">
<h4 id="orgf7ef003">–egd-file &lt;file&gt;</h4>
<div class="outline-text-4" id="text-orgf7ef003">
<p>
(TLS) Specify the path name to the Entropy Gathering Daemon socket. The socket is used to seed the random engine for SSL connections.
</p>
<p>
See also –random-file.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org34b4258">
<h4 id="org34b4258">–engine &lt;name&gt;</h4>
<div class="outline-text-4" id="text-org34b4258">
<p>
(TLS) Select the OpenSSL crypto engine to use for cipher operations. Use –engine list to print a list of build-time supported engines. Note that  not  all  (or
none) of the engines may be available at run-time.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org2db1708">
<h4 id="org2db1708">–expect100-timeout &lt;seconds&gt;</h4>
<div class="outline-text-4" id="text-org2db1708">
<p>
(HTTP)  Maximum  time  in  seconds  that  you  allow curl to wait for a 100-continue response when curl emits an Expects: 100-continue header in its request. By
default curl will wait one second. This option accepts decimal values! When curl stops waiting, it will continue as if the response has been received.
</p>
<p>
See also –connect-timeout. Added in 7.47.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org52c49e1">
<h4 id="org52c49e1">–fail-early</h4>
<div class="outline-text-4" id="text-org52c49e1">
<p>
Fail and exit on the first detected transfer error.
</p>
<p>
When curl is used to do multiple transfers on the command line, it will attempt to operate on each given URL, one by one. By default, it will ignore  errors  if
there  are  more  URLs  given and the last URL's success will determine the error code curl returns. So early failures will be "hidden" by subsequent successful
transfers.
</p>
<p>
Using this option, curl will instead return an error on the first transfer that fails, independent of the amount of URLs that are given  on  the  command  line.
This way, no transfer failures go undetected by scripts and similar.
</p>
<p>
This option is global and does not need to be specified for each use of -:, –next.
</p>
<p>
This  option  does  not imply -f, –fail, which causes transfers to fail due to the server's HTTP status code. You can combine the two options, however note -f,
–fail is not global and is therefore contained by -:, –next.
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgb1d4873">
<h4 id="orgb1d4873">-f, –fail</h4>
<div class="outline-text-4" id="text-orgb1d4873">
<p>
(HTTP) Fail silently (no output at all) on server errors. This is mostly done to better enable scripts etc to better deal with failed attempts. In normal  cases
when  an  HTTP server fails to deliver a document, it returns an HTML document stating so (which often also describes why and more). This flag will prevent curl
from outputting that and return error 22.
</p>
<p>
This method is not fail-safe and there are occasions where non-successful response codes will slip through, especially when authentication is involved (response
codes 401 and 407).
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org1ad3b80">
<h4 id="org1ad3b80">–false-start</h4>
<div class="outline-text-4" id="text-org1ad3b80">
<p>
(TLS)  Tells curl to use false start during the TLS handshake. False start is a mode where a TLS client will start sending application data before verifying the
server's Finished message, thus saving a round trip when performing a full handshake.
</p>
<p>
This is currently only implemented in the NSS and Secure Transport (on iOS 7.0 or later, or OS X 10.9 or later) backends.
</p>
<p>
Added in 7.42.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org51665d3">
<h4 id="org51665d3">–form-string &lt;name=string&gt;</h4>
<div class="outline-text-4" id="text-org51665d3">
<p>
(HTTP SMTP IMAP) Similar to -F, –form except that the value string for the named parameter is used literally. Leading '@' and '&lt;' characters, and the  ';type='
string  in the value have no special meaning. Use this in preference to -F, –form if there's any possibility that the string value may accidentally trigger the
'@' or '&lt;' features of -F, –form.
</p>
<p>
See also -F, –form.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org5e5fa86">
<h4 id="org5e5fa86">-F, –form &lt;name=content&gt;</h4>
<div class="outline-text-4" id="text-org5e5fa86">
<p>
(HTTP SMTP IMAP) 使用HTTP协议的时候，这个选项让curl模拟表单提交（HTML表单submit）。curl将设置Content-Type为multipart/form-data(RFC 2388).
</p>
<p>
For SMTP and IMAP protocols, this is the mean to compose a multipart mail message to transmit.
</p>
<p>
content部分，以'@'符号开头后面接文件名，则能够提交指定的文件。（POST文件功能）
content部分，以'&lt;'符号开始，后面接文件名，则提交的是文件的内容，在提交的表单中是name=&lt;文件内容文本&gt;，这样是不能提交文件的。
</p>
<p>
例如，向服务器提交一个名为portrait.jpg的图片，并将表单的名字设置为profile：
</p>
<pre class="example">
curl -F profile=@portrait.jpg https://example.com/upload.cgi
</pre>
<p>
如果希望从stdin中读取，则将文件名设置为'-'。对于'@'和'&lt;'都适用。
如果stdin没有附加到一个常规文件，它将被缓存，以便计算大小，和重新发送时使用。
</p>
<p>
如果content的数据来源于命名的非常规文件（例如命名管道），数据将不会被缓存，并且是在传输的时候被读取的。
因为传输时数据的大小未知，数据将以chunks（使用HTTP时）或rejected（IMAP）发送。
</p>
<p>
通过'type='，告诉curl字段的Content-Type：例如：
</p>
<pre class="example">
curl -F "web=@index.html;type=text/html" example.com
curl -F "name=daniel;type=text/foo" example.com
</pre>
<p>
Post的文件名也能通过下面的方式指定：
</p>
<pre class="example">
curl -F "file=@localfile;filename=nameinpost" example.com
如果文件路径中包含了',' ';'，必须用双引号引起来：
curl -F "file=@\"localfile\";filename=\"nameinpost\"" example.com # 里边的引号，注意转义
curl -F 'file=@"localfile";filename="nameinpost"' example.com # 或在外围使用单引号
</pre>
<p>
其他的非文件数据，包含了分号、首尾空格、双引号的，也需要引起来。
</p>
<pre class="example">
curl -F 'colors="red; green; blue";type=text/x-myapp' example.com
</pre>
<p>
通过下面的方式设置自定义header:
</p>
<pre class="example">
# header能够多次使用
curl -F "submit=OK;headers=\"X-submit-type: OK\"" example.com # 注意转义引号
curl -F "submit=OK;headers=@headerfile" example.com # 从文件中读取header
</pre>
<p>
header文件需要注意：
</p>
<ul class="org-ul">
<li>空行、以'#'开始的行被忽略</li>
<li>header能够折行，新的行以一个空格作为开始，结束的回车和空格被忽略，</li>
</ul>
<p>
例如：
</p>
<pre class="example">
# This file contain two headers.
X-header-1: this is a header

# The following header is folded.
X-header-2: this is
 another header
</pre>
<p>
To support sending multipart mail messages, the syntax is extended as follows:
</p>
<ul class="org-ul">
<li>name can be omitted: the equal sign is the first character of the argument,</li>
<li>if data starts with '(', this signals to start a new multipart: it can be followed by a content type specification.</li>
<li><p>
a multipart can be terminated with a '=)' argument.
</p>
<p>
Example: the following command sends an SMTP mime e-mail consisting in an inline part in two alternative formats: plain text and HTML. It attaches a text file:
</p>
<p>
curl -F '=(;type=multipart/alternative' \
-F '{% raw %} plain text message' \
  -F ' {% endraw %} &lt;body&gt;HTML message&lt;/body&gt;;type=text/html' \
-F '=)' -F '=@textfile.txt' …  smtp://example.com
</p>
<p>
Data can be encoded for transfer using encoder=. Available encodings are binary and 8bit that do nothing else than adding  the  corresponding  Content-Transfer-
Encoding  header,  7bit  that  only rejects 8-bit characters with a transfer error, quoted-printable and base64 that encodes data according to the corresponding
schemes, limiting lines length to 76 characters.
</p>
<p>
Example: send multipart mail with a quoted-printable text message and a base64 attached file:
</p>
<p>
curl -F '=text message;encoder=quoted-printable' \
-F '=@localfile;encoder=base64' … smtp://example.com
</p>
<p>
See further examples and details in the MANUAL.
</p>
<p>
This option can be used multiple times.
</p>
<p>
This option overrides -d, –data and -I, –head and –upload.
</p></li>
</ul>
</div>
</div>
<div class="outline-4" id="outline-container-org79b9a36">
<h4 id="org79b9a36">–ftp-account &lt;data&gt;</h4>
<div class="outline-text-4" id="text-org79b9a36">
<p>
(FTP) When an FTP server asks for "account data" after user name and password has been provided, this data is sent off using the ACCT command.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
Added in 7.13.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgcf1d0bf">
<h4 id="orgcf1d0bf">–ftp-alternative-to-user &lt;command&gt;</h4>
<div class="outline-text-4" id="text-orgcf1d0bf">
<p>
(FTP) If authenticating with the USER and PASS commands fails, send this command.  When connecting to Tumbleweed's Secure Transport server  over  FTPS  using  a
client certificate, using "SITE AUTH" will tell the server to retrieve the username from the certificate.
</p>
<p>
Added in 7.15.5.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgcb9012d">
<h4 id="orgcb9012d">–ftp-create-dirs</h4>
<div class="outline-text-4" id="text-orgcb9012d">
<p>
(FTP  SFTP)  When  an  FTP  or  SFTP  URL/operation uses a path that doesn't currently exist on the server, the standard behavior of curl is to fail. Using this
option, curl will instead attempt to create missing directories.
</p>
<p>
See also –create-dirs.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org386cb3a">
<h4 id="org386cb3a">–ftp-method &lt;method&gt;</h4>
<div class="outline-text-4" id="text-org386cb3a">
<p>
(FTP) Control what method curl should use to reach a file on an FTP(S) server. The method argument should be one of the following alternatives:
</p>
<p>
multicwd
curl does a single CWD operation for each path part in the given URL. For deep hierarchies this means very many commands. This is how RFC  1738  says  it
should be done. This is the default but the slowest behavior.
</p>
<p>
nocwd  curl does no CWD at all. curl will do SIZE, RETR, STOR etc and give a full path to the server for all these commands. This is the fastest behavior.
</p>
<p>
singlecwd
curl  does  one  CWD with the full target directory and then operates on the file "normally" (like in the multicwd case). This is somewhat more standards
compliant than 'nocwd' but without the full penalty of 'multicwd'.
</p>
<p>
Added in 7.15.1.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org81aaa17">
<h4 id="org81aaa17">–ftp-pasv</h4>
<div class="outline-text-4" id="text-org81aaa17">
<p>
(FTP) Use passive mode for the data connection. Passive is the internal default behavior, but using this option can be used to override a  previous  -P,  –ftp-
port option.
</p>
<p>
If  this option is used several times, only the first one is used. Undoing an enforced passive really isn't doable but you must then instead enforce the correct
-P, –ftp-port again.
</p>
<p>
Passive mode means that curl will try the EPSV command first and then PASV, unless –disable-epsv is used.
</p>
<p>
See also –disable-epsv. Added in 7.11.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org7bb7cbc">
<h4 id="org7bb7cbc">-P, –ftp-port &lt;address&gt;</h4>
<div class="outline-text-4" id="text-org7bb7cbc">
<p>
(FTP) Reverses the default initiator/listener roles when connecting with FTP. This option makes curl use active mode. curl then tells the server to connect back
to the client's specified address and port, while passive mode asks the server to setup an IP address and port for it to connect to. &lt;address&gt; should be one of:
</p>
<p>
interface
i.e "eth0" to specify which interface's IP address you want to use (Unix only)
</p>
<p>
IP address
i.e "192.168.10.1" to specify the exact IP address
</p>
<p>
host name
i.e "my.host.domain" to specify the machine
</p>
<ul class="org-ul">
<li>make curl pick the same IP address that is already used for the control connection</li>
</ul>
<p>
If  this  option is used several times, the last one will be used. Disable the use of PORT with –ftp-pasv. Disable the attempt to use the EPRT command instead of PORT
by using –disable-eprt. EPRT is really PORT++.
</p>
<p>
Since 7.19.5, you can append ":[start]-[end]" to the right of the address, to tell curl what TCP port range to use. That means you specify a port range, from  a  lower
to a higher number. A single number works as well, but do note that it increases the risk of failure since the port may not be available.
</p>
<p>
See also –ftp-pasv and –disable-eprt.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org6a3c191">
<h4 id="org6a3c191">–ftp-pret</h4>
<div class="outline-text-4" id="text-org6a3c191">
<p>
(FTP)  Tell  curl to send a PRET command before PASV (and EPSV). Certain FTP servers, mainly drftpd, require this non-standard command for directory listings as
well as up and downloads in PASV mode.
</p>
<p>
Added in 7.20.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org19388df">
<h4 id="org19388df">–ftp-skip-pasv-ip</h4>
<div class="outline-text-4" id="text-org19388df">
<p>
(FTP) Tell curl to not use the IP address the server suggests in its response to curl's PASV command when curl connects the data connection. Instead  curl  will
re-use the same IP address it already uses for the control connection.
</p>
<p>
This option has no effect if PORT, EPRT or EPSV is used instead of PASV.
</p>
<p>
See also –ftp-pasv. Added in 7.14.2.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org6b2dad3">
<h4 id="org6b2dad3">–ftp-ssl-ccc-mode &lt;active/passive&gt;</h4>
<div class="outline-text-4" id="text-org6b2dad3">
<p>
(FTP)  Sets the CCC mode. The passive mode will not initiate the shutdown, but instead wait for the server to do it, and will not reply to the shutdown from the
server. The active mode initiates the shutdown and waits for a reply from the server.
</p>
<p>
See also –ftp-ssl-ccc. Added in 7.16.2.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgc550cc1">
<h4 id="orgc550cc1">–ftp-ssl-ccc</h4>
<div class="outline-text-4" id="text-orgc550cc1">
<p>
(FTP) Use CCC (Clear Command Channel) Shuts down the SSL/TLS layer after authenticating. The rest of the control channel communication will be unencrypted. This
allows NAT routers to follow the FTP transaction. The default mode is passive.
</p>
<p>
See also –ssl and –ftp-ssl-ccc-mode. Added in 7.16.1.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org22fb2b0">
<h4 id="org22fb2b0">–ftp-ssl-control</h4>
<div class="outline-text-4" id="text-org22fb2b0">
<p>
(FTP) Require SSL/TLS for the FTP login, clear for transfer.  Allows secure authentication, but non-encrypted data transfers for efficiency.  Fails the transfer
if the server doesn't support SSL/TLS.
</p>
<p>
Added in 7.16.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org2d2e95f">
<h4 id="org2d2e95f">-G, –get</h4>
<div class="outline-text-4" id="text-org2d2e95f">
<p>
将所有 -d –data –data-binary –data-urlencode 指定的数据使用GET的方式，而不是POST，参数以queryString的形式放在URL后面。
</p>
<p>
如果与 -I –head 一起使用，POST的数据被追加到URL，然后以HEAD的方式请求。
</p>
<p>
如果这个选项被指定了多次，则只有第一个生效。
If  this  option  is  used  several times, only the first one is used. This is because undoing a GET doesn't make sense, but you should then instead enforce the
alternative method you prefer.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org8898527">
<h4 id="org8898527">-g, –globoff</h4>
<div class="outline-text-4" id="text-org8898527">
<p>
This option switches off the "URL globbing parser". When you set this option, you can specify URLs that contain the  letters  {}[]  without  having  them  being
interpreted by curl itself. Note that these letters are not normal legal URL contents but they should be encoded according to the URI standard.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org1854e07">
<h4 id="org1854e07">-I, –head</h4>
<div class="outline-text-4" id="text-org1854e07">
<p>
(HTTP  FTP  FILE) 仅获取头部。HTTP Servers提供的这个HEAD方法，用于只获取头部。
在FTP或FILE文件中，curl只显示文件的大小和上次修改时间。
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgc8e876f">
<h4 id="orgc8e876f">-H, –header &lt;header/@file&gt;</h4>
<div class="outline-text-4" id="text-orgc8e876f">
<p>
(HTTP)设置发送到HTTP服务器的额外的header。
如果你设置了一个与curl内部的header相同的header，你设置的header将被使用。所以需要小心设置，需要你确切地了解所设置的header。
</p>
<p>
通过留空分号的右侧的值来移除内部的header，例如 -H "Host:"
</p>
<p>
如果想发送一个没有值的自定义header,需要以分号结尾，例如： -H "X-Cusom-Header;" 这将发送 "X-Custom-Header:"
</p>
<p>
curl会确保你发送或替换的header以正确的 end-of-line 标记被发送，因此你不应当将它(end-of-line)加入到你的header内容中：
不要添加新行或回车，they will only mess things up for you.
</p>
<p>
从7.55.0开始，这个选项接受 @filename 风格的参数，用于添加文件中的所有行作为header。
使用 @- ，curl就从stdin读取header
</p>
<p>
See also the -A, –user-agent and -e, –referer options.
</p>
<p>
Starting in 7.37.0, you need –proxy-header to send custom headers intended for a proxy.
</p>
<p>
Example:
</p>
<p>
curl -H "X-First-Name: Joe" <a href="http://example.com/">http://example.com/</a>
</p>
<p>
警告：这个选项设置的header被应用于所有的请求，即使是跟踪重定向（follow redirects, 例如 -L –location）。
这会导致header被发送到其他主机上，而非原来的主机上，所以敏感的header应当慎重与follow redirects一起使用。
</p>
<p>
This option can be used multiple times to add/replace/remove multiple headers.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org30f3b5c">
<h4 id="org30f3b5c">-h, –help</h4>
<div class="outline-text-4" id="text-org30f3b5c">
<p>
Usage help. This lists all current command line options with a short description.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgb834b92">
<h4 id="orgb834b92">–hostpubmd5 &lt;md5&gt;</h4>
<div class="outline-text-4" id="text-orgb834b92">
<p>
(SFTP  SCP)  Pass a string containing 32 hexadecimal digits. The string should be the 128 bit MD5 checksum of the remote host's public key, curl will refuse the
connection with the host unless the md5sums match.
</p>
<p>
Added in 7.17.1.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org1b283cc">
<h4 id="org1b283cc">-0, –http1.0</h4>
<div class="outline-text-4" id="text-org1b283cc">
<p>
(HTTP) Tells curl to use HTTP version 1.0 instead of using its internally preferred HTTP version.
</p>
<p>
This option overrides –http1.1 and –http2.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org9c02f8e">
<h4 id="org9c02f8e">–http1.1</h4>
<div class="outline-text-4" id="text-org9c02f8e">
<p>
(HTTP) Tells curl to use HTTP version 1.1.
</p>
<p>
This option overrides -0, –http1.0 and –http2. Added in 7.33.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org74a0c6e">
<h4 id="org74a0c6e">–http2-prior-knowledge</h4>
<div class="outline-text-4" id="text-org74a0c6e">
<p>
(HTTP) Tells curl to issue its non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade. It requires prior knowledge that the server supports HTTP/2 straight
away. HTTPS requests will still do HTTP/2 the standard way with negotiated protocol version in the TLS handshake.
</p>
<p>
–http2-prior-knowledge  requires  that the underlying libcurl was built to support HTTP/2. This option overrides –http1.1 and -0, –http1.0 and –http2. Added
in 7.49.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org9c2a7a7">
<h4 id="org9c2a7a7">–http2</h4>
<div class="outline-text-4" id="text-org9c2a7a7">
<p>
(HTTP) Tells curl to use HTTP version 2.
</p>
<p>
See also –no-alpn. –http2 requires that the underlying libcurl  was  built  to  support  HTTP/2.  This  option  overrides  –http1.1  and  -0,  –http1.0  and
–http2-prior-knowledge. Added in 7.33.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org129dc44">
<h4 id="org129dc44">–ignore-content-length</h4>
<div class="outline-text-4" id="text-org129dc44">
<p>
(FTP  HTTP)  For  HTTP, Ignore the Content-Length header. This is particularly useful for servers running Apache 1.x, which will report incorrect Content-Length
for files larger than 2 gigabytes.
</p>
<p>
For FTP (since 7.46.0), skip the RETR command to figure out the size before downloading a file.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org8f0d222">
<h4 id="org8f0d222">-i, –include</h4>
<div class="outline-text-4" id="text-org8f0d222">
<p>
Include the HTTP response headers in the output. The HTTP response headers can include things like server name, cookies, date of the document, HTTP version  and
more…
</p>
<p>
To view the request headers, consider the -v, –verbose option.
</p>
<p>
See also -v, –verbose.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgcd69441">
<h4 id="orgcd69441">-k, –insecure</h4>
<div class="outline-text-4" id="text-orgcd69441">
<p>
(TLS) By default, every SSL connection curl makes is verified to be secure. This option allows curl to proceed and operate even for server connections otherwise
considered insecure.
</p>
<p>
The server connection is verified by making sure the server's certificate contains the right name and verifies successfully using the cert store.
</p>
<p>
See this online resource for further details:
<a href="https://curl.haxx.se/docs/sslcerts.html">https://curl.haxx.se/docs/sslcerts.html</a>
</p>
<p>
See also –proxy-insecure and –cacert.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgf809b88">
<h4 id="orgf809b88">–interface &lt;name&gt;</h4>
<div class="outline-text-4" id="text-orgf809b88">
<p>
Perform an operation using a specified interface. You can enter interface name, IP address or host name. An example could look like:
</p>
<p>
curl –interface eth0:1 <a href="https://www.example.com/">https://www.example.com/</a>
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
On Linux it can be used to specify a VRF, but the binary needs  to  either  have  CAP_NET_RAW  or  to  be  ran  as  root.  More  information  about  Linux  VRF:
<a href="https://www.kernel.org/doc/Documentation/networking/vrf.txt">https://www.kernel.org/doc/Documentation/networking/vrf.txt</a>
</p>
<p>
See also –dns-interface.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org34e7073">
<h4 id="org34e7073">-4, –ipv4</h4>
<div class="outline-text-4" id="text-org34e7073">
<p>
This option tells curl to resolve names to IPv4 addresses only, and not for example try IPv6.
</p>
<p>
See also –http1.1 and –http2. This option overrides -6, –ipv6.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgfa14266">
<h4 id="orgfa14266">-6, –ipv6</h4>
<div class="outline-text-4" id="text-orgfa14266">
<p>
This option tells curl to resolve names to IPv6 addresses only, and not for example try IPv4.
</p>
<p>
See also –http1.1 and –http2. This option overrides -6, –ipv6.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgfd4ee08">
<h4 id="orgfd4ee08">-j, –junk-session-cookies</h4>
<div class="outline-text-4" id="text-orgfd4ee08">
<p>
(HTTP)  When curl is told to read cookies from a given file, this option will make it discard all "session cookies". This will basically have the same effect as
if a new session is started. Typical browsers always discard session cookies when they're closed down.
</p>
<p>
See also -b, –cookie and -c, –cookie-jar.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org2a8f5ed">
<h4 id="org2a8f5ed">–keepalive-time &lt;seconds&gt;</h4>
<div class="outline-text-4" id="text-org2a8f5ed">
<p>
This option sets the time a connection needs to remain idle before sending keepalive probes and the time between individual keepalive probes.  It  is  currently
effective on operating systems offering the TCP_KEEPIDLE and TCP_KEEPINTVL socket options (meaning Linux, recent AIX, HP-UX and more). This option has no effect
if –no-keepalive is used.
</p>
<p>
If this option is used several times, the last one will be used. If unspecified, the option defaults to 60 seconds.
</p>
<p>
Added in 7.18.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgd80ea62">
<h4 id="orgd80ea62">–key-type &lt;type&gt;</h4>
<div class="outline-text-4" id="text-orgd80ea62">
<p>
(TLS) Private key file type. Specify which type your –key provided private key is. DER, PEM, and ENG are supported. If not specified, PEM is assumed.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org168549d">
<h4 id="org168549d">–key &lt;key&gt;</h4>
<div class="outline-text-4" id="text-org168549d">
<p>
(TLS SSH) Private key file name. Allows you to provide your private key in this separate file. For SSH, if not specified, curl tries the following candidates in
order:
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org34f354c">
<h4 id="org34f354c">–krb &lt;level&gt;</h4>
<div class="outline-text-4" id="text-org34f354c">
<p>
(FTP)  Enable  Kerberos  authentication  and use. The level must be entered and should be one of 'clear', 'safe', 'confidential', or 'private'. Should you use a
level that is not one of these, 'private' will instead be used.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
–krb requires that the underlying libcurl was built to support Kerberos.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org7425862">
<h4 id="org7425862">–libcurl &lt;file&gt;</h4>
<div class="outline-text-4" id="text-org7425862">
<p>
Append this option to any ordinary curl command line, and you will get a libcurl-using C source code written to the file that does the equivalent of  what  your
command-line operation does!
</p>
<p>
If this option is used several times, the last given file name will be used.
</p>
<p>
Added in 7.16.1.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgd5dc3d7">
<h4 id="orgd5dc3d7">–limit-rate &lt;speed&gt;</h4>
<div class="outline-text-4" id="text-orgd5dc3d7">
<p>
Specify  the  maximum transfer rate you want curl to use - for both downloads and uploads. This feature is useful if you have a limited pipe and you'd like your
transfer not to use your entire bandwidth. To make it slower than it otherwise would be.
</p>
<p>
The given speed is measured in bytes/second, unless a suffix is appended.  Appending 'k' or 'K' will count  the  number  as  kilobytes,  'm'  or  'M'  makes  it
megabytes, while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G.
</p>
<p>
If  you  also  use  the -Y, –speed-limit option, that option will take precedence and might cripple the rate-limiting slightly, to help keeping the speed-limit
logic working.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org32e344b">
<h4 id="org32e344b">-l, –list-only</h4>
<div class="outline-text-4" id="text-org32e344b">
<p>
(FTP POP3) (FTP) When listing an FTP directory, this switch forces a name-only view. This is especially useful if the user wants to machine-parse  the  contents
of  an  FTP directory since the normal directory view doesn't use a standard look or format. When used like this, the option causes a NLST command to be sent to
the server instead of LIST.
</p>
<p>
Note: Some FTP servers list only files in their response to NLST; they do not include sub-directories and symbolic links.
</p>
<p>
(POP3) When retrieving a specific email from POP3, this switch forces a LIST command to be performed instead of RETR. This is particularly useful  if  the  user
wants to see if a specific message id exists on the server and what size it is.
</p>
<p>
Note:  When  combined with -X, –request, this option can be used to send an UIDL command instead, so the user may use the email's unique identifier rather than
it's message id to make the request.
</p>
<p>
Added in 7.21.5.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org0b94d68">
<h4 id="org0b94d68">–local-port &lt;num/range&gt;</h4>
<div class="outline-text-4" id="text-org0b94d68">
<p>
Set a preferred single number or range (FROM-TO) of local port numbers to use for the connection(s).  Note that port numbers by nature  are  a  scarce  resource
that will be busy at times so setting this range to something too narrow might cause unnecessary connection setup failures.
</p>
<p>
Added in 7.15.2.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org3398df1">
<h4 id="org3398df1">–location-trusted</h4>
<div class="outline-text-4" id="text-org3398df1">
<p>
(HTTP)  Like  -L,  –location,  but  will allow sending the name + password to all hosts that the site may redirect to. This may or may not introduce a security
breach if the site redirects you to a site to which you'll send your authentication info (which is plaintext in the case of HTTP Basic authentication).
</p>
<p>
See also -u, –user.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org9c07b0f">
<h4 id="org9c07b0f">-L, –location</h4>
<div class="outline-text-4" id="text-org9c07b0f">
<p>
(HTTP) If the server reports that the requested page has moved to a different location (indicated with a Location: header and a 3XX response code), this  option
will  make  curl  redo  the  request  on  the new place. If used together with -i, –include or -I, –head, headers from all requested pages will be shown. When
authentication is used, curl only sends its credentials to the initial host. If a redirect takes curl to a different host, it won't be  able  to  intercept  the
user+password. See also –location-trusted on how to change this. You can limit the amount of redirects to follow by using the –max-redirs option.
</p>
<p>
When  curl follows a redirect and the request is not a plain GET (for example POST or PUT), it will do the following request with a GET if the HTTP response was
301, 302, or 303. If the response code was any other 3xx code, curl will re-send the following request using the same unmodified method.
</p>
<p>
You can tell curl to not change the non-GET request method to GET after a 30x response by using  the  dedicated  options  for  that:  –post301,  –post302  and
–post303.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org32c4cbb">
<h4 id="org32c4cbb">–login-options &lt;options&gt;</h4>
<div class="outline-text-4" id="text-org32c4cbb">
<p>
(IMAP POP3 SMTP) Specify the login options to use during server authentication.
</p>
<p>
You  can  use  the  login options to specify protocol specific options that may be used during authentication. At present only IMAP, POP3 and SMTP support login
options. For more information about the login options please see RFC 2384, RFC 5092 and IETF draft draft-earhart-url-smtp-00.txt
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
Added in 7.34.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orge6da8df">
<h4 id="orge6da8df">–mail-auth &lt;address&gt;</h4>
<div class="outline-text-4" id="text-orge6da8df">
<p>
(SMTP) Specify a single address. This will be used to specify the authentication address (identity) of a submitted message that  is  being  relayed  to  another
server.
</p>
<p>
See also –mail-rcpt and –mail-from. Added in 7.25.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org517e0d6">
<h4 id="org517e0d6">–mail-from &lt;address&gt;</h4>
<div class="outline-text-4" id="text-org517e0d6">
<p>
(SMTP) Specify a single address that the given mail should get sent from.
</p>
<p>
See also –mail-rcpt and –mail-auth. Added in 7.20.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org2f867fc">
<h4 id="org2f867fc">–mail-rcpt &lt;address&gt;</h4>
<div class="outline-text-4" id="text-org2f867fc">
<p>
(SMTP) Specify a single address, user name or mailing list name. Repeat this option several times to send to multiple recipients.
</p>
<p>
When performing a mail transfer, the recipient should specify a valid email address to send the mail to.
</p>
<p>
When  performing  an  address  verification  (VRFY  command),  the recipient should be specified as the user name or user name and domain (as per Section 3.5 of
RFC5321). (Added in 7.34.0)
</p>
<p>
When performing a mailing list expand (EXPN command), the recipient should be specified using the mailing list  name,  such  as  "Friends"  or  "London-Office".
(Added in 7.34.0)
</p>
<p>
Added in 7.20.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org9e122b6">
<h4 id="org9e122b6">-M, –manual</h4>
<div class="outline-text-4" id="text-org9e122b6">
<p>
Manual. Display the huge help text.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org944a7e3">
<h4 id="org944a7e3">–max-filesize &lt;bytes&gt;</h4>
<div class="outline-text-4" id="text-org944a7e3">
<p>
Specify  the  maximum  size  (in bytes) of a file to download. If the file requested is larger than this value, the transfer will not start and curl will return
with exit code 63.
</p>
<p>
A size modifier may be used. For example, Appending 'k' or 'K' will count the number as kilobytes, 'm' or 'M' makes it megabytes, while  'g'  or  'G'  makes  it
gigabytes. Examples: 200K, 3m and 1G. (Added in 7.58.0)
</p>
<p>
NOTE: The file size is not always known prior to download, and for such files this option has no effect even if the file transfer ends up being larger than this
given limit. This concerns both FTP and HTTP transfers.
</p>
<p>
See also –limit-rate.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org96ff725">
<h4 id="org96ff725">–max-redirs &lt;num&gt;</h4>
<div class="outline-text-4" id="text-org96ff725">
<p>
(HTTP) Set maximum number of redirection-followings allowed. When -L, –location is used, is used to prevent curl from following redirections "in absurdum".  By
default, the limit is set to 50 redirections. Set this option to -1 to make it unlimited.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org025408c">
<h4 id="org025408c">-m, –max-time &lt;time&gt;</h4>
<div class="outline-text-4" id="text-org025408c">
<p>
Maximum  time  in seconds that you allow the whole operation to take.  This is useful for preventing your batch jobs from hanging for hours due to slow networks
or links going down.  Since 7.32.0, this option accepts decimal values, but the actual timeout will decrease in accuracy as the specified timeout  increases  in
decimal precision.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
See also –connect-timeout.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org7525dc9">
<h4 id="org7525dc9">–metalink</h4>
<div class="outline-text-4" id="text-org7525dc9">
<p>
This  option  can tell curl to parse and process a given URI as Metalink file (both version 3 and 4 (RFC 5854) are supported) and make use of the mirrors listed
within for failover if there are errors (such as the file or server not being available). It will also verify the hash of the file after the download completes.
The Metalink file itself is downloaded and processed in memory and not stored in the local file system.
</p>
<p>
Example to use a remote Metalink file:
</p>
<p>
curl –metalink <a href="http://www.example.com/example.metalink">http://www.example.com/example.metalink</a>
</p>
<p>
To use a Metalink file in the local file system, use FILE protocol (<a href="file://">file://</a>):
</p>
<p>
curl –metalink <a href="file://example.metalink">file://example.metalink</a>
</p>
<p>
Please  note  that  if FILE protocol is disabled, there is no way to use a local Metalink file at the time of this writing. Also note that if –metalink and -i,
–include are used together, –include will be ignored. This is because including headers in the response will break Metalink parser  and  if  the  headers  are
included in the file described in Metalink file, hash check will fail.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org2b68e66">
<h4 id="org2b68e66">–metalink requires that the underlying libcurl was built to support metalink. Added in 7.27.0.</h4>
</div>
<div class="outline-4" id="outline-container-orgb71adaa">
<h4 id="orgb71adaa">–negotiate</h4>
<div class="outline-text-4" id="text-orgb71adaa">
<p>
(HTTP) Enables Negotiate (SPNEGO) authentication.
</p>
<p>
This option requires a library built with GSS-API or SSPI support. Use -V, –version to see if your curl supports GSS-API/SSPI or SPNEGO.
</p>
<p>
When using this option, you must also provide a fake -u, –user option to activate the authentication code properly. Sending a '-u :' is enough as the user name
and password from the -u, –user option aren't actually used.
</p>
<p>
If this option is used several times, only the first one is used.
</p>
<p>
See also –basic and –ntlm and –anyauth and –proxy-negotiate.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgd1e5c88">
<h4 id="orgd1e5c88">–netrc-file &lt;filename&gt;</h4>
<div class="outline-text-4" id="text-orgd1e5c88">
<p>
This option is similar to -n, –netrc, except that you provide the path (absolute or relative) to the netrc file that Curl should use.  You can only specify one
netrc file per invocation. If several –netrc-file options are provided, the last one will be used.
</p>
<p>
It will abide by –netrc-optional if specified.
</p>
<p>
This option overrides -n, –netrc. Added in 7.21.5.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgf4435a6">
<h4 id="orgf4435a6">–netrc-optional</h4>
<div class="outline-text-4" id="text-orgf4435a6">
<p>
Very similar to -n, –netrc, but this option makes the .netrc usage optional and not mandatory as the -n, –netrc option does.
</p>
<p>
See also –netrc-file. This option overrides -n, –netrc.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orge32e889">
<h4 id="orge32e889">-n, –netrc</h4>
<div class="outline-text-4" id="text-orge32e889">
<p>
Makes  curl  scan  the .netrc (_netrc on Windows) file in the user's home directory for login name and password. This is typically used for FTP on Unix. If used
with HTTP, curl will enable user authentication. See netrc(5) ftp(1) for details on the file format. Curl will not complain if that file doesn't have the  right
permissions (it should not be either world- or group-readable). The environment variable "HOME" is used to find the home directory.
</p>
<p>
A  quick  and  very  simple  example  of how to setup a .netrc to allow curl to FTP to the machine host.domain.com with user name 'myself' and password 'secret'
should look similar to:
</p>
<p>
machine host.domain.com login myself password secret
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgb251abd">
<h4 id="orgb251abd">-:, –next</h4>
<div class="outline-text-4" id="text-orgb251abd">
<p>
Tells curl to use a separate operation for the following URL and associated options. This allows you to send several URL requests, each with their own  specific
options, for example, such as different user names or custom requests for each.
</p>
<p>
-:,  –next  will reset all local options and only global ones will have their values survive over to the operation following the -:, –next instruction. Global
options include -v, –verbose, –trace, –trace-ascii and –fail-early.
</p>
<p>
For example, you can do both a GET and a POST in a single command line:
</p>
<p>
curl www1.example.com –next -d postthis www2.example.com
</p>
<p>
Added in 7.36.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org908cd60">
<h4 id="org908cd60">–no-alpn</h4>
<div class="outline-text-4" id="text-org908cd60">
<p>
(HTTPS) Disable the ALPN TLS extension. ALPN is enabled by default if libcurl was built with an SSL library that supports ALPN. ALPN is used by a  libcurl  that
supports HTTP/2 to negotiate HTTP/2 support with the server during https sessions.
</p>
<p>
See also –no-npn and –http2. –no-alpn requires that the underlying libcurl was built to support TLS. Added in 7.36.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgee55a7f">
<h4 id="orgee55a7f">-N, –no-buffer</h4>
<div class="outline-text-4" id="text-orgee55a7f">
<p>
Disables  the  buffering of the output stream. In normal work situations, curl will use a standard buffered output stream that will have the effect that it will
output the data in chunks, not necessarily exactly when the data arrives.  Using this option will disable that buffering.
</p>
<p>
Note that this is the negated option name documented. You can thus use –buffer to enforce the buffering.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org2f4e505">
<h4 id="org2f4e505">–no-keepalive</h4>
<div class="outline-text-4" id="text-org2f4e505">
<p>
Disables the use of keepalive messages on the TCP connection. curl otherwise enables them by default.
</p>
<p>
Note that this is the negated option name documented. You can thus use –keepalive to enforce keepalive.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgd983bc4">
<h4 id="orgd983bc4">–no-npn</h4>
<div class="outline-text-4" id="text-orgd983bc4">
<p>
(HTTPS) Disable the NPN TLS extension. NPN is enabled by default if libcurl was built with an SSL library that supports NPN. NPN is used by a libcurl that  sup‐
ports HTTP/2 to negotiate HTTP/2 support with the server during https sessions.
</p>
<p>
See also –no-alpn and –http2. –no-npn requires that the underlying libcurl was built to support TLS. Added in 7.36.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org5a94b02">
<h4 id="org5a94b02">–no-sessionid</h4>
<div class="outline-text-4" id="text-org5a94b02">
<p>
(TLS) Disable curl's use of SSL session-ID caching.  By default all transfers are done using the cache. Note that while nothing should ever get hurt by attempt‐
ing to reuse SSL session-IDs, there seem to be broken SSL implementations in the wild that may require you to disable this in order for you to succeed.
</p>
<p>
Note that this is the negated option name documented. You can thus use –sessionid to enforce session-ID caching.
</p>
<p>
Added in 7.16.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org8d899a4">
<h4 id="org8d899a4">–noproxy &lt;no-proxy-list&gt;</h4>
<div class="outline-text-4" id="text-org8d899a4">
<p>
Comma-separated list of hosts which do not use a proxy, if one is specified.  The only wildcard is a single * character, which matches  all  hosts,  and  effec‐
tively  disables  the  proxy.  Each  name in this list is matched as either a domain which contains the hostname, or the hostname itself. For example, local.com
would match local.com, local.com:80, and www.local.com, but not www.notlocal.com.
</p>
<p>
Since 7.53.0, This option overrides the environment variables that disable the proxy. If there's an environment variable disabling a proxy, you can set  noproxy
list to "" to override it.
</p>
<p>
Added in 7.19.4.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org3af6bac">
<h4 id="org3af6bac">–ntlm-wb</h4>
<div class="outline-text-4" id="text-org3af6bac">
<p>
(HTTP) Enables NTLM much in the style –ntlm does, but hand over the authentication to the separate binary ntlmauth application that is executed when needed.
</p>
<p>
See also –ntlm and –proxy-ntlm.
</p>
<p>
–ntlm (HTTP)  Enables  NTLM  authentication.  The  NTLM  authentication method was designed by Microsoft and is used by IIS web servers. It is a proprietary protocol,
reverse-engineered by clever people and implemented in curl based on their efforts. This kind of behavior should not be endorsed, you should encourage  everyone
who uses NTLM to switch to a public and documented authentication method instead, such as Digest.
</p>
<p>
If you want to enable NTLM for your proxy authentication, then use –proxy-ntlm.
</p>
<p>
If this option is used several times, only the first one is used.
</p>
<p>
See  also  –proxy-ntlm.  –ntlm  requires that the underlying libcurl was built to support TLS. This option overrides –basic and –negotiated and –digest and
–anyauth.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org962b622">
<h4 id="org962b622">–oauth2-bearer &lt;token&gt;</h4>
<div class="outline-text-4" id="text-org962b622">
<p>
(IMAP POP3 SMTP) Specify the Bearer Token for OAUTH 2.0 server authentication. The Bearer Token is used in conjunction with the user name which can be specified
as part of the –url or -u, –user options.
</p>
<p>
The Bearer Token and user name are formatted according to RFC 6750.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgb6ec324">
<h4 id="orgb6ec324">-o, –output &lt;file&gt;</h4>
<div class="outline-text-4" id="text-orgb6ec324">
<p>
将输出写入&lt;file&gt;，而非stdout。
如果使用了{}或[]获取多个文档的时候，在&lt;file&gt;中 '#' 后加上数字，例如：
That variable will be replaced with the current string for the URL being fetched. Like in:
</p>
<p>
curl <a href="http://{one,two}.example.com">http://{one,two}.example.com</a> -o "file_#1.txt" =&gt; file_one.txt file_two.txt
</p>
<p>
curl <a href="http://{site,host}.host">http://{site,host}.host</a>[1-5].com -o "#1_#2" =&gt; site_1, site_2, site_3, site_4, site_5, host_1, host_2, host_3, host_4, host_5
</p>
<p>
多次使用 -o，例如：
</p>
<p>
curl -o aa example.com -o bb example.net
</p>
<p>
-o 和 url 的顺序无所谓，第一个-o指定第一个url的输出，第二个-o指定了第二个url的输出，所以上面的命令也能写成：
</p>
<p>
curl example.com example.net -o aa -o bb
</p>
<p>
如果希望 -o 所指定的目录自动创建，使用 –create-dirs
</p>
<p>
将-o的值设置为 '-'（单横线），强制输出到stdout上
</p>
<p>
See also -O, –remote-name and –remote-name-all and -J, –remote-header-name.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgca1b747">
<h4 id="orgca1b747">–pass &lt;phrase&gt;</h4>
<div class="outline-text-4" id="text-orgca1b747">
<p>
(SSH TLS) Passphrase for the private key
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org1009d13">
<h4 id="org1009d13">–path-as-is</h4>
<div class="outline-text-4" id="text-org1009d13">
<p>
Tell curl to not handle sequences of <i>..</i> or <i>.</i> in the given URL path. Normally curl will squash or merge them according to standards but with this option  set
you tell it not to do that.
</p>
<p>
Added in 7.42.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgb5b0829">
<h4 id="orgb5b0829">–pinnedpubkey &lt;hashes&gt;</h4>
<div class="outline-text-4" id="text-orgb5b0829">
<p>
(TLS)  Tells curl to use the specified public key file (or hashes) to verify the peer. This can be a path to a file which contains a single public key in PEM or
DER format, or any number of base64 encoded sha256 hashes preceded by ´sha256//´ and separated by ´;´
</p>
<p>
When negotiating a TLS or SSL connection, the server sends a certificate indicating its identity. A public key is extracted from this certificate and if it does
not exactly match the public key provided to this option, curl will abort the connection before sending or receiving any data.
</p>
<p>
PEM/DER support:
7.39.0: OpenSSL, GnuTLS and GSKit
7.43.0: NSS and wolfSSL/CyaSSL
7.47.0: mbedtls
7.49.0: PolarSSL sha256 support:
7.44.0: OpenSSL, GnuTLS, NSS and wolfSSL/CyaSSL.
7.47.0: mbedtls
7.49.0: PolarSSL Other SSL backends not supported.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgc600c4c">
<h4 id="orgc600c4c">–post301</h4>
<div class="outline-text-4" id="text-orgc600c4c">
<p>
(HTTP)  Tells  curl to respect RFC 7231/6.4.2 and not convert POST requests into GET requests when following a 301 redirection. The non-RFC behaviour is ubiqui‐
tous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such  a  redi‐
rection. This option is meaningful only when using -L, –location.
</p>
<p>
See also –post302 and –post303 and -L, –location. Added in 7.17.1.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgb85758d">
<h4 id="orgb85758d">–post302</h4>
<div class="outline-text-4" id="text-orgb85758d">
<p>
(HTTP)  Tells  curl to respect RFC 7231/6.4.3 and not convert POST requests into GET requests when following a 302 redirection. The non-RFC behaviour is ubiqui‐
tous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such  a  redi‐
rection. This option is meaningful only when using -L, –location.
</p>
<p>
See also –post301 and –post303 and -L, –location. Added in 7.19.1.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgdaaee63">
<h4 id="orgdaaee63">–post303</h4>
<div class="outline-text-4" id="text-orgdaaee63">
<p>
(HTTP)  Tells  curl to respect RFC 7231/6.4.4 and not convert POST requests into GET requests when following a 303 redirection. The non-RFC behaviour is ubiqui‐
tous in web browsers, so curl does the conversion by default to maintain consistency. However, a server may require a POST to remain a POST after such  a  redi‐
rection. This option is meaningful only when using -L, –location.
</p>
<p>
See also –post302 and –post301 and -L, –location. Added in 7.26.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org806bec0">
<h4 id="org806bec0">–preproxy [protocol://]host[:port]</h4>
<div class="outline-text-4" id="text-org806bec0">
<p>
Use  the  specified  SOCKS  proxy  before  connecting  to  an HTTP or HTTPS -x, –proxy. In such a case curl first connects to the SOCKS proxy and then connects
(through SOCKS) to the HTTP or HTTPS proxy. Hence pre proxy.
</p>
<p>
The pre proxy string should be specified with a protocol:// prefix to specify alternative proxy protocols. Use socks4://, socks4a://, socks5:// or socks5h:// to
request the specific SOCKS version to be used. No protocol specified will make curl default to SOCKS4.
</p>
<p>
If the port number is not specified in the proxy string, it is assumed to be 1080.
</p>
<p>
User  and  password  that might be provided in the proxy string are URL decoded by curl. This allows you to pass in special characters such as @ by using %40 or
pass in a colon with %3a.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgeb3fe2e">
<h4 id="orgeb3fe2e">-#, –progress-bar</h4>
<div class="outline-text-4" id="text-orgeb3fe2e">
<p>
Make curl display transfer progress as a simple progress bar instead of the standard, more informational, meter.
</p>
<p>
This progress bar draws a single line of '#' characters across the screen and shows a percentage if the transfer size is known. For transfers  without  a  known
size, it will instead output one '#' character for every 1024 bytes transferred.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org971606f">
<h4 id="org971606f">–proto-default &lt;protocol&gt;</h4>
<div class="outline-text-4" id="text-org971606f">
<p>
Tells curl to use protocol for any URL missing a scheme name.
</p>
<p>
Example:
</p>
<p>
curl –proto-default https ftp.mozilla.org
</p>
<p>
An unknown or unsupported protocol causes error CURLE_UNSUPPORTED_PROTOCOL (1).
</p>
<p>
This option does not change the default proxy protocol (http).
</p>
<p>
Without this option curl would make a guess based on the host, see –url for details.
</p>
<p>
Added in 7.45.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org9cbf925">
<h4 id="org9cbf925">–proto-redir &lt;protocols&gt;</h4>
<div class="outline-text-4" id="text-org9cbf925">
<p>
Tells curl to limit what protocols it may use on redirect. Protocols denied by –proto are not overridden by this option. See –proto for how protocols are rep‐
resented.
</p>
<p>
Example, allow only HTTP and HTTPS on redirect:
</p>
<p>
curl –proto-redir -all,http,https <a href="http://example.com">http://example.com</a>
</p>
<p>
By default curl will allow all protocols on redirect except several disabled for security reasons: Since 7.19.4 FILE and SCP are disabled, and since 7.40.0  SMB
and SMBS are also disabled. Specifying all or +all enables all protocols on redirect, including those disabled for security.
</p>
<p>
Added in 7.20.2.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgbd6b0c3">
<h4 id="orgbd6b0c3">–proto &lt;protocols&gt;</h4>
<div class="outline-text-4" id="text-orgbd6b0c3">
<p>
Tells curl to limit what protocols it may use in the transfer. Protocols are evaluated left to right, are comma separated, and are each a protocol name or
</p>
<ul class="org-ul">
<li>Permit this protocol in addition to protocols already permitted (this is the default if no modifier is used).</li>
<li>Deny this protocol, removing it from the list of protocols already permitted.</li>
</ul>
<p>
=  Permit only this protocol (ignoring the list already permitted), though subject to later modification by subsequent entries in the comma separated list.
</p>
<p>
For example:
</p>
<p>
–proto -ftps  uses the default protocols, but disables ftps
</p>
<p>
–proto -all,https,+http
only enables http and https
</p>
<p>
–proto =http,https
also only enables http and https
</p>
<p>
Unknown protocols produce a warning. This allows scripts to safely rely on being able to disable potentially dangerous protocols, without relying upon support for that
protocol being built into curl to avoid an error.
</p>
<p>
This option can be used multiple times, in which case the effect is the same as concatenating the protocols into one instance of the option.
</p>
<p>
See also –proto-redir and –proto-default. Added in 7.20.2.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org8823557">
<h4 id="org8823557">–proxy-anyauth</h4>
<div class="outline-text-4" id="text-org8823557">
<p>
Tells curl to pick a suitable authentication method when communicating with the given HTTP proxy. This might cause an extra request/response round-trip.
</p>
<p>
See also -x, –proxy and –proxy-basic and –proxy-digest. Added in 7.13.2.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgd4d9dc0">
<h4 id="orgd4d9dc0">–proxy-basic</h4>
<div class="outline-text-4" id="text-orgd4d9dc0">
<p>
Tells curl to use HTTP Basic authentication when communicating with the given proxy. Use –basic for enabling HTTP Basic  with  a  remote  host.  Basic  is  the
default authentication method curl uses with proxies.
</p>
<p>
See also -x, –proxy and –proxy-anyauth and –proxy-digest.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org44d7565">
<h4 id="org44d7565">–proxy-cacert &lt;file&gt;</h4>
<div class="outline-text-4" id="text-org44d7565">
<p>
Same as –cacert but used in HTTPS proxy context.
</p>
<p>
See also –proxy-capath and –cacert and –capath and -x, –proxy. Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orge6dc93e">
<h4 id="orge6dc93e">–proxy-capath &lt;dir&gt;</h4>
<div class="outline-text-4" id="text-orge6dc93e">
<p>
Same as –capath but used in HTTPS proxy context.
</p>
<p>
See also –proxy-cacert and -x, –proxy and –capath. Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org7ffb247">
<h4 id="org7ffb247">–proxy-cert-type &lt;type&gt;</h4>
<div class="outline-text-4" id="text-org7ffb247">
<p>
Same as –cert-type but used in HTTPS proxy context.
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org6c6731f">
<h4 id="org6c6731f">–proxy-cert &lt;cert[:passwd]&gt;</h4>
<div class="outline-text-4" id="text-org6c6731f">
<p>
Same as -E, –cert but used in HTTPS proxy context.
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org8178d39">
<h4 id="org8178d39">–proxy-ciphers &lt;list&gt;</h4>
<div class="outline-text-4" id="text-org8178d39">
<p>
Same as –ciphers but used in HTTPS proxy context.
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org2e26398">
<h4 id="org2e26398">–proxy-crlfile &lt;file&gt;</h4>
<div class="outline-text-4" id="text-org2e26398">
<p>
Same as –crlfile but used in HTTPS proxy context.
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orged45f86">
<h4 id="orged45f86">–proxy-digest</h4>
<div class="outline-text-4" id="text-orged45f86">
<p>
Tells curl to use HTTP Digest authentication when communicating with the given proxy. Use –digest for enabling HTTP Digest with a remote host.
</p>
<p>
See also -x, –proxy and –proxy-anyauth and –proxy-basic.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org9c4ce1a">
<h4 id="org9c4ce1a">–proxy-header &lt;header/@file&gt;</h4>
<div class="outline-text-4" id="text-org9c4ce1a">
<p>
(HTTP)  Extra  header  to include in the request when sending HTTP to a proxy. You may specify any number of extra headers. This is the equivalent option to -H,
–header but is for proxy communication only like in CONNECT requests when you want a separate header sent to the proxy to what is sent  to  the  actual  remote
host.
</p>
<p>
curl  will  make sure that each header you add/replace is sent with the proper end-of-line marker, you should thus not add that as a part of the header content:
do not add newlines or carriage returns, they will only mess things up for you.
</p>
<p>
Headers specified with this option will not be included in requests that curl knows will not be sent to a proxy.
</p>
<p>
Starting in 7.55.0, this option can take an argument in @filename style, which then adds a header for each line in the input file. Using @- will make curl  read
the header file from stdin.
</p>
<p>
This option can be used multiple times to add/replace/remove multiple headers.
</p>
<p>
Added in 7.37.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org4d4f3f8">
<h4 id="org4d4f3f8">–proxy-insecure</h4>
<div class="outline-text-4" id="text-org4d4f3f8">
<p>
Same as -k, –insecure but used in HTTPS proxy context.
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgb98afb6">
<h4 id="orgb98afb6">–proxy-key-type &lt;type&gt;</h4>
<div class="outline-text-4" id="text-orgb98afb6">
<p>
Same as –key-type but used in HTTPS proxy context.
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org17ce3ed">
<h4 id="org17ce3ed">–proxy-key &lt;key&gt;</h4>
<div class="outline-text-4" id="text-org17ce3ed">
<p>
Same as –key but used in HTTPS proxy context.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org1352060">
<h4 id="org1352060">–proxy-negotiate</h4>
<div class="outline-text-4" id="text-org1352060">
<p>
Tells  curl  to  use HTTP Negotiate (SPNEGO) authentication when communicating with the given proxy. Use –negotiate for enabling HTTP Negotiate (SPNEGO) with a
remote host.
</p>
<p>
See also –proxy-anyauth and –proxy-basic. Added in 7.17.1.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org0d2b2d9">
<h4 id="org0d2b2d9">–proxy-ntlm</h4>
<div class="outline-text-4" id="text-org0d2b2d9">
<p>
Tells curl to use HTTP NTLM authentication when communicating with the given proxy. Use –ntlm for enabling NTLM with a remote host.
</p>
<p>
See also –proxy-negotiate and –proxy-anyauth.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org3c3b82b">
<h4 id="org3c3b82b">–proxy-pass &lt;phrase&gt;</h4>
<div class="outline-text-4" id="text-org3c3b82b">
<p>
Same as –pass but used in HTTPS proxy context.
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org21ad840">
<h4 id="org21ad840">–proxy-service-name &lt;name&gt;</h4>
<div class="outline-text-4" id="text-org21ad840">
<p>
This option allows you to change the service name for proxy negotiation.
</p>
<p>
Added in 7.43.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org67853de">
<h4 id="org67853de">–proxy-ssl-allow-beast</h4>
<div class="outline-text-4" id="text-org67853de">
<p>
Same as –ssl-allow-beast but used in HTTPS proxy context.
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org7683f86">
<h4 id="org7683f86">–proxy-tlsauthtype &lt;type&gt;</h4>
<div class="outline-text-4" id="text-org7683f86">
<p>
Same as –tlsauthtype but used in HTTPS proxy context.
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org018bead">
<h4 id="org018bead">–proxy-tlspassword &lt;string&gt;</h4>
<div class="outline-text-4" id="text-org018bead">
<p>
Same as –tlspassword but used in HTTPS proxy context.
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org9c0f1c4">
<h4 id="org9c0f1c4">–proxy-tlsuser &lt;name&gt;</h4>
<div class="outline-text-4" id="text-org9c0f1c4">
<p>
Same as –tlsuser but used in HTTPS proxy context.
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgc116566">
<h4 id="orgc116566">–proxy-tlsv1</h4>
<div class="outline-text-4" id="text-orgc116566">
<p>
Same as -1, –tlsv1 but used in HTTPS proxy context.
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org2c924a2">
<h4 id="org2c924a2">-U, –proxy-user &lt;user:password&gt;</h4>
<div class="outline-text-4" id="text-org2c924a2">
<p>
Specify the user name and password to use for proxy authentication.
</p>
<p>
If you use a Windows SSPI-enabled curl binary and do either Negotiate or NTLM authentication then you can tell curl to select the user name  and  password  from
your environment by specifying a single colon with this option: "-U :".
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orge79b1aa">
<h4 id="orge79b1aa">-x, –proxy [protocol://]host[:port]</h4>
<div class="outline-text-4" id="text-orge79b1aa">
<p>
Use the specified proxy.
</p>
<p>
The  proxy  string  can  be  specified  with  a  protocol://  prefix. No protocol specified or <a href="http://">http://</a> will be treated as HTTP proxy. Use socks4://, socks4a://,
socks5:// or socks5h:// to request a specific SOCKS version to be used.  (The protocol support was added in curl 7.21.7)
</p>
<p>
HTTPS proxy support via <a href="https://">https://</a> protocol prefix was added in 7.52.0 for OpenSSL, GnuTLS and NSS.
</p>
<p>
Unrecognized and unsupported proxy protocols cause an error since 7.52.0.  Prior versions may ignore the protocol and use <a href="http://">http://</a> instead.
</p>
<p>
If the port number is not specified in the proxy string, it is assumed to be 1080.
</p>
<p>
This option overrides existing environment variables that set the proxy to use. If there's an environment variable setting a proxy, you can set proxy to  ""  to
override it.
</p>
<p>
All  operations  that  are performed over an HTTP proxy will transparently be converted to HTTP. It means that certain protocol specific operations might not be
available. This is not the case if you can tunnel through the proxy, as one with the -p, –proxytunnel option.
</p>
<p>
User and password that might be provided in the proxy string are URL decoded by curl. This allows you to pass in special characters such as @ by  using  %40  or
pass in a colon with %3a.
</p>
<p>
The proxy host can be specified the exact same way as the proxy environment variables, including the protocol prefix (<a href="http://">http://</a>) and the embedded user + password.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org93ad1a4">
<h4 id="org93ad1a4">–proxy1.0 &lt;host[:port]&gt;</h4>
<div class="outline-text-4" id="text-org93ad1a4">
<p>
Use the specified HTTP 1.0 proxy. If the port number is not specified, it is assumed at port 1080.
</p>
<p>
The  only  difference  between  this  and the HTTP proxy option -x, –proxy, is that attempts to use CONNECT through the proxy will specify an HTTP 1.0 protocol
instead of the default HTTP 1.1.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org8196bcc">
<h4 id="org8196bcc">-p, –proxytunnel</h4>
<div class="outline-text-4" id="text-org8196bcc">
<p>
When an HTTP proxy is used -x, –proxy, this option will cause non-HTTP protocols to attempt to tunnel through the proxy instead of merely using it to do  HTTP-
like  operations.  The  tunnel  approach is made with the HTTP proxy CONNECT request and requires that the proxy allows direct connect to the remote port number
curl wants to tunnel through to.
</p>
<p>
To suppress proxy CONNECT response headers when curl is set to output headers use –suppress-connect-headers.
</p>
<p>
See also -x, –proxy.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org5568d75">
<h4 id="org5568d75">–pubkey &lt;key&gt;</h4>
<div class="outline-text-4" id="text-org5568d75">
<p>
(SFTP SCP) Public key file name. Allows you to provide your public key in this separate file.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
(As of 7.39.0, curl attempts to automatically extract the public key from the private key file, so passing this option is generally not required. Note that this
public key extraction requires libcurl to be linked against a copy of libssh2 1.2.8 or higher that is itself linked against OpenSSL.)
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgb242f21">
<h4 id="orgb242f21">-Q, –quote</h4>
<div class="outline-text-4" id="text-orgb242f21">
<p>
(FTP  SFTP) Send an arbitrary command to the remote FTP or SFTP server. Quote commands are sent BEFORE the transfer takes place (just after the initial PWD com‐
mand in an FTP transfer, to be exact). To make commands take place after a successful transfer, prefix them with a dash '-'.  To make  commands  be  sent  after
curl has changed the working directory, just before the transfer command(s), prefix the command with a '+' (this is only supported for FTP). You may specify any
number of commands.
</p>
<p>
If the server returns failure for one of the commands, the entire operation will be aborted. You must send syntactically correct FTP commands as RFC 959 defines
to FTP servers, or one of the commands listed below to SFTP servers.
</p>
<p>
This  option can be used multiple times. When speaking to an FTP server, prefix the command with an asterisk (*) to make curl continue even if the command fails
as by default curl will stop at first failure.
</p>
<p>
SFTP is a binary protocol. Unlike for FTP, curl interprets SFTP quote commands itself before sending them to the server.  File names may be  quoted  shell-style
to embed spaces or special characters.  Following is the list of all supported SFTP quote commands:
</p>
<p>
chgrp group file
The  chgrp command sets the group ID of the file named by the file operand to the group ID specified by the group operand. The group operand is a decimal
integer group ID.
</p>
<p>
chmod mode file
The chmod command modifies the file mode bits of the specified file. The mode operand is an octal integer mode number.
</p>
<p>
chown user file
The chown command sets the owner of the file named by the file operand to the user ID specified by the user operand. The user operand is a decimal  inte‐
ger user ID.
</p>
<p>
ln source_file target_file
The ln and symlink commands create a symbolic link at the target_file location pointing to the source_file location.
</p>
<p>
mkdir directory_name
The mkdir command creates the directory named by the directory_name operand.
</p>
<p>
pwd    The pwd command returns the absolute pathname of the current working directory.
</p>
<p>
rename source target
The rename command renames the file or directory named by the source operand to the destination path named by the target operand.
</p>
<p>
rm file
The rm command removes the file specified by the file operand.
</p>
<p>
rmdir directory
The rmdir command removes the directory entry specified by the directory operand, provided it is empty.
</p>
<p>
symlink source_file target_file
See ln.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orge8b94cf">
<h4 id="orge8b94cf">–random-file &lt;file&gt;</h4>
<div class="outline-text-4" id="text-orge8b94cf">
<p>
Specify  the  path name to file containing what will be considered as random data. The data may be used to seed the random engine for SSL connections.  See also
the –egd-file option.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org64e66df">
<h4 id="org64e66df">-r, –range &lt;range&gt;</h4>
<div class="outline-text-4" id="text-org64e66df">
<p>
(HTTP FTP SFTP FILE) Retrieve a byte range (i.e a partial document) from a HTTP/1.1, FTP or SFTP server or a local FILE. Ranges can be specified in a number  of
ways.
</p>
<p>
0-499     specifies the first 500 bytes
</p>
<p>
500-999   specifies the second 500 bytes
</p>
<p>
-500      specifies the last 500 bytes
</p>
<p>
9500-     specifies the bytes from offset 9500 and forward
</p>
<p>
0-0,-1    specifies the first and last byte only(*)(HTTP)
</p>
<p>
100-199,500-599
specifies two separate 100-byte ranges(*) (HTTP)
</p>
<p>
(*) = NOTE that this will cause the server to reply with a multipart response!
</p>
<p>
Only  digit  characters  (0-9)  are valid in the 'start' and 'stop' fields of the 'start-stop' range syntax. If a non-digit character is given in the range, the
server's response will be unspecified, depending on the server's configuration.
</p>
<p>
You should also be aware that many HTTP/1.1 servers do not have this feature enabled, so that when you attempt to get a range, you'll instead get the whole doc‐
ument.
</p>
<p>
FTP  and SFTP range downloads only support the simple 'start-stop' syntax (optionally with one of the numbers omitted). FTP use depends on the extended FTP com‐
mand SIZE.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org4b3bf27">
<h4 id="org4b3bf27">–raw  (HTTP) When used, it disables all internal HTTP decoding of content or transfer encodings and instead makes them passed on unaltered, raw.</h4>
<div class="outline-text-4" id="text-org4b3bf27">
<p>
Added in 7.16.2.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org1a6c48d">
<h4 id="org1a6c48d">-e, –referer &lt;URL&gt;</h4>
<div class="outline-text-4" id="text-org1a6c48d">
<p>
(HTTP) Sends the "Referrer Page" information to the HTTP server. This can also be set with the -H, –header flag of course.  When used with -L,  –location  you
can  append  ";auto" to the -e, –referer URL to make curl automatically set the previous URL when it follows a Location: header. The ";auto" string can be used
alone, even if you don't set an initial -e, –referer.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
See also -A, –user-agent and -H, –header.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgb04296e">
<h4 id="orgb04296e">-J, –remote-header-name</h4>
<div class="outline-text-4" id="text-orgb04296e">
<p>
(HTTP) This option tells the -O, –remote-name option to use the server-specified Content-Disposition filename instead of extracting a filename from the URL.
</p>
<p>
If the server specifies a file name and a file with that name already exists in the current working directory it will not  be  overwritten  and  an  error  will
occur. If the server doesn't specify a file name then this option has no effect.
</p>
<p>
There's no attempt to decode %-sequences (yet) in the provided file name, so this option may provide you with rather unexpected file names.
</p>
<p>
WARNING:  Exercise  judicious  use  of  this option, especially on Windows. A rogue server could send you the name of a DLL or other file that could possibly be
loaded automatically by Windows or some third party software.
</p>
<p>
–remote-name-all
This option changes the default action for all given URLs to be dealt with as if -O, –remote-name were used for each one. So if you want to disable that for  a
specific URL after –remote-name-all has been used, you must use "-o -" or –no-remote-name.
</p>
<p>
Added in 7.19.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgff8054e">
<h4 id="orgff8054e">-O, –remote-name</h4>
<div class="outline-text-4" id="text-orgff8054e">
<p>
Write output to a local file named like the remote file we get. (Only the file part of the remote file is used, the path is cut off.)
</p>
<p>
The file will be saved in the current working directory. If you want the file saved in a different directory, make sure you change the current working directory
before invoking curl with this option.
</p>
<p>
The remote file name to use for saving is extracted from the given URL, nothing else, and if it already exists it will be overwritten. If you want the server to
be  able to choose the file name refer to -J, –remote-header-name which can be used in addition to this option. If the server chooses a file name and that name
already exists it will not be overwritten.
</p>
<p>
There is no URL decoding done on the file name. If it has %20 or other URL encoded parts of the name, they will end up as-is as file name.
</p>
<p>
You may use this option as many times as the number of URLs you have.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgcd3e423">
<h4 id="orgcd3e423">-R, –remote-time</h4>
<div class="outline-text-4" id="text-orgcd3e423">
<p>
When used, this will make curl attempt to figure out the timestamp of the remote file, and if that is available make the local file get that same timestamp.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org583e2ea">
<h4 id="org583e2ea">–request-target</h4>
<div class="outline-text-4" id="text-org583e2ea">
<p>
(HTTP) Tells curl to use an alternative "target" (path) instead of using the path as provided in the  URL.  Particularly  useful  when  wanting  to  issue  HTTP
requests without leading slash or other data that doesn't follow the regular URL pattern, like "OPTIONS *".
</p>
<p>
Added in 7.55.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org662ff20">
<h4 id="org662ff20">-X, –request &lt;command&gt;</h4>
<div class="outline-text-4" id="text-org662ff20">
<p>
(HTTP) Specifies a custom request method to use when communicating with the HTTP server.  The specified request method will be used instead of the method other‐
wise used (which defaults to GET). Read the HTTP 1.1 specification for details and explanations. Common additional HTTP requests include  PUT  and  DELETE,  but
related technologies like WebDAV offers PROPFIND, COPY, MOVE and more.
</p>
<p>
Normally you don't need this option. All sorts of GET, HEAD, POST and PUT requests are rather invoked by using dedicated command line options.
</p>
<p>
This  option  only  changes  the  actual word used in the HTTP request, it does not alter the way curl behaves. So for example if you want to make a proper HEAD
request, using -X HEAD will not suffice. You need to use the -I, –head option.
</p>
<p>
The method string you set with -X, –request will be used for all requests, which if you for example use -L, –location may cause unintended  side-effects  when
curl doesn't change request method according to the HTTP 30x response codes - and similar.
</p>
<p>
(FTP) Specifies a custom FTP command to use instead of LIST when doing file lists with FTP.
</p>
<p>
(POP3) Specifies a custom POP3 command to use instead of LIST or RETR. (Added in 7.26.0)
</p>
<p>
(IMAP) Specifies a custom IMAP command to use instead of LIST. (Added in 7.30.0)
</p>
<p>
(SMTP) Specifies a custom SMTP command to use instead of HELP or VRFY. (Added in 7.34.0)
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgf397270">
<h4 id="orgf397270">–resolve &lt;host:port:address&gt;</h4>
<div class="outline-text-4" id="text-orgf397270">
<p>
Provide a custom address for a specific host and port pair. Using this, you can make the curl requests(s) use a specified address and prevent the otherwise nor‐
mally resolved address to be used. Consider it a sort of /etc/hosts alternative provided on the command line. The port number should be the number used for  the
specific protocol the host will be used for. It means you need several entries if you want to provide address for the same host but different ports.
</p>
<p>
The provided address set by this option will be used even if -4, –ipv4 or -6, –ipv6 is set to make curl use another IP version.
</p>
<p>
Support for providing the IP address within [brackets] was added in 7.57.0.
</p>
<p>
This option can be used many times to add many host names to resolve.
</p>
<p>
Added in 7.21.3.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orga43844e">
<h4 id="orga43844e">–retry-connrefused</h4>
<div class="outline-text-4" id="text-orga43844e">
<p>
In addition to the other conditions, consider ECONNREFUSED as a transient error too for –retry. This option is used together with –retry.
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgee4e6e2">
<h4 id="orgee4e6e2">–retry-delay &lt;seconds&gt;</h4>
<div class="outline-text-4" id="text-orgee4e6e2">
<p>
Make  curl  sleep this amount of time before each retry when a transfer has failed with a transient error (it changes the default backoff time algorithm between
retries). This option is only interesting if –retry is also used. Setting this delay to zero will make curl use the default backoff time.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
Added in 7.12.3.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org90f4734">
<h4 id="org90f4734">–retry-max-time &lt;seconds&gt;</h4>
<div class="outline-text-4" id="text-org90f4734">
<p>
The retry timer is reset before the first transfer attempt. Retries will be done as usual (see –retry) as long as the timer hasn't reached  this  given  limit.
Notice  that  if  the  timer hasn't reached the limit, the request will be made and while performing, it may take longer than this given time period. To limit a
single request´s maximum time, use -m, –max-time.  Set this option to zero to not timeout retries.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
Added in 7.12.3.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org1cbb567">
<h4 id="org1cbb567">–retry &lt;num&gt;</h4>
<div class="outline-text-4" id="text-org1cbb567">
<p>
If a transient error is returned when curl tries to perform a transfer, it will retry this number of times before giving up. Setting the number to 0 makes  curl
do no retries (which is the default). Transient error means either: a timeout, an FTP 4xx response code or an HTTP 5xx response code.
</p>
<p>
When  curl  is about to retry a transfer, it will first wait one second and then for all forthcoming retries it will double the waiting time until it reaches 10
minutes which then will be the delay between the rest of the retries.  By using –retry-delay you disable this exponential backoff algorithm. See also  –retry-
max-time to limit the total time allowed for retries.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
Added in 7.12.3.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org0e75c65">
<h4 id="org0e75c65">–sasl-ir</h4>
<div class="outline-text-4" id="text-org0e75c65">
<p>
Enable initial response in SASL authentication.
</p>
<p>
Added in 7.31.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org07cd0a6">
<h4 id="org07cd0a6">–service-name &lt;name&gt;</h4>
<div class="outline-text-4" id="text-org07cd0a6">
<p>
This option allows you to change the service name for SPNEGO.
</p>
<p>
Examples: –negotiate –service-name sockd would use sockd/server-name.
</p>
<p>
Added in 7.43.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org30fa14b">
<h4 id="org30fa14b">-S, –show-error</h4>
<div class="outline-text-4" id="text-org30fa14b">
<p>
When used with -s, –silent, it makes curl show an error message if it fails.
</p>
<p>
-s, –silent
Silent  or  quiet mode. Don't show progress meter or error messages.  Makes Curl mute. It will still output the data you ask for, potentially even to the termi‐
nal/stdout unless you redirect it.
</p>
<p>
Use -S, –show-error in addition to this option to disable progress meter but still show error messages.
</p>
<p>
See also -v, –verbose and –stderr.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgc8ea4f5">
<h4 id="orgc8ea4f5">–socks4 &lt;host[:port]&gt;</h4>
<div class="outline-text-4" id="text-orgc8ea4f5">
<p>
Use the specified SOCKS4 proxy. If the port number is not specified, it is assumed at port 1080.
</p>
<p>
This option overrides any previous use of -x, –proxy, as they are mutually exclusive.
</p>
<p>
Since 7.21.7, this option is superfluous since you can specify a socks4 proxy with -x, –proxy using a socks4:// protocol prefix.
</p>
<p>
Since 7.52.0, –preproxy can be used to specify a SOCKS proxy at the same time -x, –proxy is used with an HTTP/HTTPS proxy. In such a case curl first  connects
to the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
Added in 7.15.2.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org389ffe7">
<h4 id="org389ffe7">–socks4a &lt;host[:port]&gt;</h4>
<div class="outline-text-4" id="text-org389ffe7">
<p>
Use the specified SOCKS4a proxy. If the port number is not specified, it is assumed at port 1080.
</p>
<p>
This option overrides any previous use of -x, –proxy, as they are mutually exclusive.
</p>
<p>
Since 7.21.7, this option is superfluous since you can specify a socks4a proxy with -x, –proxy using a socks4a:// protocol prefix.
</p>
<p>
Since  7.52.0, –preproxy can be used to specify a SOCKS proxy at the same time -x, –proxy is used with an HTTP/HTTPS proxy. In such a case curl first connects
to the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
Added in 7.18.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org42bde48">
<h4 id="org42bde48">–socks5-basic</h4>
<div class="outline-text-4" id="text-org42bde48">
<p>
Tells curl to use username/password authentication when connecting to a SOCKS5  proxy.   The  username/password  authentication  is  enabled  by  default.   Use
–socks5-gssapi to force GSS-API authentication to SOCKS5 proxies.
</p>
<p>
Added in 7.55.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org6d2c430">
<h4 id="org6d2c430">–socks5-gssapi-nec</h4>
<div class="outline-text-4" id="text-org6d2c430">
<p>
As  part  of the GSS-API negotiation a protection mode is negotiated. RFC 1961 says in section 4.3/4.4 it should be protected, but the NEC reference implementa‐
tion does not.  The option –socks5-gssapi-nec allows the unprotected exchange of the protection mode negotiation.
</p>
<p>
Added in 7.19.4.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orge29183f">
<h4 id="orge29183f">–socks5-gssapi-service &lt;name&gt;</h4>
<div class="outline-text-4" id="text-orge29183f">
<p>
The default service name for a socks server is rcmd/server-fqdn. This option allows you to change it.
</p>
<p>
Examples: –socks5 proxy-name –socks5-gssapi-service sockd would use sockd/proxy-name –socks5 proxy-name  –socks5-gssapi-service  sockd/real-name  would  use
sockd/real-name for cases where the proxy-name does not match the principal name.
</p>
<p>
Added in 7.19.4.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org6e0c138">
<h4 id="org6e0c138">–socks5-gssapi</h4>
<div class="outline-text-4" id="text-org6e0c138">
<p>
Tells  curl to use GSS-API authentication when connecting to a SOCKS5 proxy.  The GSS-API authentication is enabled by default (if curl is compiled with GSS-API
support).  Use –socks5-basic to force username/password authentication to SOCKS5 proxies.
</p>
<p>
Added in 7.55.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgf8e4496">
<h4 id="orgf8e4496">–socks5-hostname &lt;host[:port]&gt;</h4>
<div class="outline-text-4" id="text-orgf8e4496">
<p>
Use the specified SOCKS5 proxy (and let the proxy resolve the host name). If the port number is not specified, it is assumed at port 1080.
</p>
<p>
This option overrides any previous use of -x, –proxy, as they are mutually exclusive.
</p>
<p>
Since 7.21.7, this option is superfluous since you can specify a socks5 hostname proxy with -x, –proxy using a socks5h:// protocol prefix.
</p>
<p>
Since 7.52.0, –preproxy can be used to specify a SOCKS proxy at the same time -x, –proxy is used with an HTTP/HTTPS proxy. In such a case curl first  connects
to the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
Added in 7.18.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org33fe89b">
<h4 id="org33fe89b">–socks5 &lt;host[:port]&gt;</h4>
<div class="outline-text-4" id="text-org33fe89b">
<p>
Use the specified SOCKS5 proxy - but resolve the host name locally. If the port number is not specified, it is assumed at port 1080.
</p>
<p>
This option overrides any previous use of -x, –proxy, as they are mutually exclusive.
</p>
<p>
Since 7.21.7, this option is superfluous since you can specify a socks5 proxy with -x, –proxy using a socks5:// protocol prefix.
</p>
<p>
Since  7.52.0, –preproxy can be used to specify a SOCKS proxy at the same time -x, –proxy is used with an HTTP/HTTPS proxy. In such a case curl first connects
to the SOCKS proxy and then connects (through SOCKS) to the HTTP or HTTPS proxy.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
This option (as well as –socks4) does not work with IPV6, FTPS or LDAP.
</p>
<p>
Added in 7.18.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org6a6524f">
<h4 id="org6a6524f">-Y, –speed-limit &lt;speed&gt;</h4>
<div class="outline-text-4" id="text-org6a6524f">
<p>
If a download is slower than this given speed (in bytes per second) for speed-time seconds it gets aborted. speed-time is set with -y, –speed-time and is 30 if
not set.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org812eff7">
<h4 id="org812eff7">-y, –speed-time &lt;seconds&gt;</h4>
<div class="outline-text-4" id="text-org812eff7">
<p>
If  a download is slower than speed-limit bytes per second during a speed-time period, the download gets aborted. If speed-time is used, the default speed-limit
will be 1 unless set with -Y, –speed-limit.
</p>
<p>
This option controls transfers and thus will not affect slow connects etc. If this is a concern for you, try the –connect-timeout option.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orga840291">
<h4 id="orga840291">–ssl-allow-beast</h4>
<div class="outline-text-4" id="text-orga840291">
<p>
This option tells curl to not work around a security flaw in the SSL3 and TLS1.0 protocols known as BEAST.  If this option isn't used, the  SSL  layer  may  use
workarounds  known to cause interoperability problems with some older SSL implementations. WARNING: this option loosens the SSL security, and by using this flag
you ask for exactly that.
</p>
<p>
Added in 7.25.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgf5dc25d">
<h4 id="orgf5dc25d">–ssl-no-revoke</h4>
<div class="outline-text-4" id="text-orgf5dc25d">
<p>
(WinSSL) This option tells curl to disable certificate revocation checks.  WARNING: this option loosens the SSL security, and by using this  flag  you  ask  for
exactly that.
</p>
<p>
Added in 7.44.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgf5aedf0">
<h4 id="orgf5aedf0">–ssl-reqd</h4>
<div class="outline-text-4" id="text-orgf5aedf0">
<p>
(FTP IMAP POP3 SMTP) Require SSL/TLS for the connection.  Terminates the connection if the server doesn't support SSL/TLS.
</p>
<p>
This option was formerly known as –ftp-ssl-reqd.
</p>
<p>
Added in 7.20.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org01ac41e">
<h4 id="org01ac41e">–ssl  (FTP  IMAP POP3 SMTP) Try to use SSL/TLS for the connection.  Reverts to a non-secure connection if the server doesn't support SSL/TLS.  See also –ftp-ssl-con‐</h4>
<div class="outline-text-4" id="text-org01ac41e">
<p>
trol and –ssl-reqd for different levels of encryption required.
</p>
<p>
This option was formerly known as –ftp-ssl (Added in 7.11.0). That option name can still be used but will be removed in a future version.
</p>
<p>
Added in 7.20.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org33f955f">
<h4 id="org33f955f">-2, –sslv2</h4>
<div class="outline-text-4" id="text-org33f955f">
<p>
(SSL) Forces curl to use SSL version 2 when negotiating with a remote SSL server. Sometimes curl is built without SSLv2  support.  SSLv2  is  widely  considered
insecure (see RFC 6176).
</p>
<p>
See also –http1.1 and –http2. -2, –sslv2 requires that the underlying libcurl was built to support TLS. This option overrides -3, –sslv3 and -1, –tlsv1 and
–tlsv1.1 and –tlsv1.2.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org408f265">
<h4 id="org408f265">-3, –sslv3</h4>
<div class="outline-text-4" id="text-org408f265">
<p>
(SSL) Forces curl to use SSL version 3 when negotiating with a remote SSL server. Sometimes curl is built without SSLv3  support.  SSLv3  is  widely  considered
insecure (see RFC 7568).
</p>
<p>
See also –http1.1 and –http2. -3, –sslv3 requires that the underlying libcurl was built to support TLS. This option overrides -2, –sslv2 and -1, –tlsv1 and
–tlsv1.1 and –tlsv1.2.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org7e164be">
<h4 id="org7e164be">–stderr</h4>
<div class="outline-text-4" id="text-org7e164be">
<p>
Redirect all writes to stderr to the specified file instead. If the file name is a plain '-', it is instead written to stdout.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
See also -v, –verbose and -s, –silent.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org7d5f973">
<h4 id="org7d5f973">–suppress-connect-headers</h4>
<div class="outline-text-4" id="text-org7d5f973">
<p>
When -p, –proxytunnel is used and a CONNECT request is made don't output proxy CONNECT response headers. This option is meant to be used with -D, –dump-header
or -i, –include which are used to show protocol headers in the output. It has no effect on debug options such as -v, –verbose or –trace, or any statistics.
</p>
<p>
See also -D, –dump-header and -i, –include and -p, –proxytunnel.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org2292130">
<h4 id="org2292130">–tcp-fastopen</h4>
<div class="outline-text-4" id="text-org2292130">
<p>
Enable use of TCP Fast Open (RFC7413).
</p>
<p>
Added in 7.49.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org5394c14">
<h4 id="org5394c14">–tcp-nodelay</h4>
<div class="outline-text-4" id="text-org5394c14">
<p>
Turn on the TCP_NODELAY option. See the curl_easy_setopt(3) man page for details about this option.
</p>
<p>
Since 7.50.2, curl sets this option by default and you need to explicitly switch it off if you don't want it on.
</p>
<p>
Added in 7.11.2.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgaa774d0">
<h4 id="orgaa774d0">-t, –telnet-option &lt;opt=val&gt;</h4>
<div class="outline-text-4" id="text-orgaa774d0">
<p>
Pass options to the telnet protocol. Supported options are:
</p>
<p>
TTYPE=&lt;term&gt; Sets the terminal type.
</p>
<p>
XDISPLOC=&lt;X display&gt; Sets the X display location.
</p>
<p>
NEW_ENV=&lt;var,val&gt; Sets an environment variable.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgff83f50">
<h4 id="orgff83f50">–tftp-blksize &lt;value&gt;</h4>
<div class="outline-text-4" id="text-orgff83f50">
<p>
(TFTP)  Set TFTP BLKSIZE option (must be &gt;512). This is the block size that curl will try to use when transferring data to or from a TFTP server. By default 512
bytes will be used.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
Added in 7.20.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org09b7d8f">
<h4 id="org09b7d8f">–tftp-no-options</h4>
<div class="outline-text-4" id="text-org09b7d8f">
<p>
(TFTP) Tells curl not to send TFTP options requests.
</p>
<p>
This option improves interop with some legacy servers that do not acknowledge or properly implement TFTP options. When this option  is  used  –tftp-blksize  is
ignored.
</p>
<p>
Added in 7.48.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgad7794f">
<h4 id="orgad7794f">-z, –time-cond &lt;time&gt;</h4>
<div class="outline-text-4" id="text-orgad7794f">
<p>
(HTTP  FTP)  Request a file that has been modified later than the given time and date, or one that has been modified before that time. The &lt;date expression&gt; can
be all sorts of date strings or if it doesn't match any internal ones, it is taken as a filename and tries to get the  modification  date  (mtime)  from  &lt;file&gt;
instead. See the curl_getdate(3) man pages for date expression details.
</p>
<p>
Start the date expression with a dash (-) to make it request for a document that is older than the given date/time, default is a document that is newer than the
specified date/time.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org3ec602f">
<h4 id="org3ec602f">–tls-max &lt;VERSION&gt;</h4>
<div class="outline-text-4" id="text-org3ec602f">
<p>
(SSL) VERSION defines maximum supported TLS version. A minimum is defined by arguments tlsv1.0 or tlsv1.1 or tlsv1.2.
</p>
<p>
default
Use up to recommended TLS version.
</p>
<p>
1.0    Use up to TLSv1.0.
</p>
<p>
1.1    Use up to TLSv1.1.
</p>
<p>
1.2    Use up to TLSv1.2.
</p>
<p>
1.3    Use up to TLSv1.3.
</p>
<p>
See also –tlsv1.0 and –tlsv1.1 and –tlsv1.2. –tls-max requires that the underlying libcurl was built to support TLS. Added in 7.54.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org29d3c92">
<h4 id="org29d3c92">–tlsauthtype &lt;type&gt;</h4>
<div class="outline-text-4" id="text-org29d3c92">
<p>
Set TLS authentication type. Currently, the only supported option is  "SRP",  for  TLS-SRP  (RFC  5054).  If  –tlsuser  and  –tlspassword  are  specified  but
–tlsauthtype is not, then this option defaults to "SRP".
</p>
<p>
Added in 7.21.4.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org3f2e90b">
<h4 id="org3f2e90b">–tlspassword</h4>
<div class="outline-text-4" id="text-org3f2e90b">
<p>
Set password for use with the TLS authentication method specified with –tlsauthtype. Requires that –tlsuser also be set.
</p>
<p>
Added in 7.21.4.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org06d506a">
<h4 id="org06d506a">–tlsuser &lt;name&gt;</h4>
<div class="outline-text-4" id="text-org06d506a">
<p>
Set username for use with the TLS authentication method specified with –tlsauthtype. Requires that –tlspassword also is set.
</p>
<p>
Added in 7.21.4.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org42ea50e">
<h4 id="org42ea50e">–tlsv1.0</h4>
<div class="outline-text-4" id="text-org42ea50e">
<p>
(TLS) Forces curl to use TLS version 1.0 when connecting to a remote TLS server.
</p>
<p>
Added in 7.34.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orga31b301">
<h4 id="orga31b301">–tlsv1.1</h4>
<div class="outline-text-4" id="text-orga31b301">
<p>
(TLS) Forces curl to use TLS version 1.1 when connecting to a remote TLS server.
</p>
<p>
Added in 7.34.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org0f6c91f">
<h4 id="org0f6c91f">–tlsv1.2</h4>
<div class="outline-text-4" id="text-org0f6c91f">
<p>
(TLS) Forces curl to use TLS version 1.2 when connecting to a remote TLS server.
</p>
<p>
Added in 7.34.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orge7363f0">
<h4 id="orge7363f0">–tlsv1.3</h4>
<div class="outline-text-4" id="text-orge7363f0">
<p>
(TLS) Forces curl to use TLS version 1.3 when connecting to a remote TLS server.
</p>
<p>
Note that TLS 1.3 is only supported by a subset of TLS backends. At the time of this writing, they are BoringSSL, NSS, and Secure Transport (on iOS 11 or later,
and macOS 10.13 or later).
</p>
<p>
Added in 7.52.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org3cddbef">
<h4 id="org3cddbef">-1, –tlsv1</h4>
<div class="outline-text-4" id="text-org3cddbef">
<p>
(SSL) Tells curl to use TLS version 1.x when negotiating with a remote TLS server. That means TLS version 1.0, 1.1 or 1.2.
</p>
<p>
See also –http1.1 and –http2. -1, –tlsv1 requires that the underlying libcurl was built to support TLS. This option overrides  –tlsv1.1  and  –tlsv1.2  and
–tlsv1.3.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org9ce38ea">
<h4 id="org9ce38ea">–tr-encoding</h4>
<div class="outline-text-4" id="text-org9ce38ea">
<p>
(HTTP) Request a compressed Transfer-Encoding response using one of the algorithms curl supports, and uncompress the data while receiving it.
</p>
<p>
Added in 7.21.6.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org64b3227">
<h4 id="org64b3227">–trace-ascii &lt;file&gt;</h4>
<div class="outline-text-4" id="text-org64b3227">
<p>
Enables a full trace dump of all incoming and outgoing data, including descriptive information, to the given output file. Use "-" as filename to have the output
sent to stdout.
</p>
<p>
This is very similar to –trace, but leaves out the hex part and only shows the ASCII part of the dump. It makes smaller output that might be easier to read for
untrained humans.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
This option overrides –trace and -v, –verbose.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgde3fcb1">
<h4 id="orgde3fcb1">–trace-time</h4>
<div class="outline-text-4" id="text-orgde3fcb1">
<p>
Prepends a time stamp to each trace or verbose line that curl displays.
</p>
<p>
Added in 7.14.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org78c017d">
<h4 id="org78c017d">–trace &lt;file&gt;</h4>
<div class="outline-text-4" id="text-org78c017d">
<p>
Enables a full trace dump of all incoming and outgoing data, including descriptive information, to the given output file. Use "-" as filename to have the output
sent to stdout. Use "%" as filename to have the output sent to stderr.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
This option overrides -v, –verbose and –trace-ascii.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgd12ec15">
<h4 id="orgd12ec15">–unix-socket &lt;path&gt;</h4>
<div class="outline-text-4" id="text-orgd12ec15">
<p>
(HTTP) Connect through this Unix domain socket, instead of using the network.
</p>
<p>
Added in 7.40.0.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org69963a9">
<h4 id="org69963a9">-T, –upload-file &lt;file&gt;</h4>
<div class="outline-text-4" id="text-org69963a9">
<p>
This transfers the specified local file to the remote URL. If there is no file part in the specified URL, curl will append the local file name.  NOTE  that  you
must  use  a  trailing / on the last directory to really prove to Curl that there is no file name or curl will think that your last directory name is the remote
file name to use. That will most likely cause the upload operation to fail. If this is used on an HTTP(S) server, the PUT command will be used.
</p>
<p>
Use the file name "-" (a single dash) to use stdin instead of a given file.  Alternately, the file name "." (a single period) may be specified instead of "-" to
use stdin in non-blocking mode to allow reading server output while stdin is being uploaded.
</p>
<p>
You  can specify one -T, –upload-file for each URL on the command line. Each -T, –upload-file + URL pair specifies what to upload and to where. curl also sup‐
ports "globbing" of the -T, –upload-file argument, meaning that you can upload multiple files to a single URL by using the same URL globbing style supported in
the URL, like this:
</p>
<p>
curl –upload-file "{file1,file2}" <a href="http://www.example.com">http://www.example.com</a>
</p>
<p>
or even
</p>
<p>
curl -T "img[1-1000].png" <a href="ftp://ftp.example.com/upload/">ftp://ftp.example.com/upload/</a>
</p>
<p>
When  uploading to an SMTP server: the uploaded data is assumed to be RFC 5322 formatted. It has to feature the necessary set of headers and mail body formatted
correctly by the user as curl will not transcode nor encode it further in any way.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org664a462">
<h4 id="org664a462">–url &lt;url&gt;</h4>
<div class="outline-text-4" id="text-org664a462">
<p>
Specify a URL to fetch. This option is mostly handy when you want to specify URL(s) in a config file.
</p>
<p>
If the given URL is missing a scheme name (such as "<a href="http://">http://</a>" or "<a href="ftp://">ftp://</a>" etc) then curl will make a guess based on the host. If the  outermost  sub-domain  name
matches  DICT,  FTP,  IMAP,  LDAP, POP3 or SMTP then that protocol will be used, otherwise HTTP will be used. Since 7.45.0 guessing can be disabled by setting a
default protocol, see –proto-default for details.
</p>
<p>
This option may be used any number of times. To control where this URL is written, use the -o, –output or the -O, –remote-name options.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org0aef12c">
<h4 id="org0aef12c">-B, –use-ascii</h4>
<div class="outline-text-4" id="text-org0aef12c">
<p>
(FTP LDAP) Enable ASCII transfer. For FTP, this can also be enforced by using a URL that ends with ";type=A". This option causes data sent to stdout  to  be  in
text mode for win32 systems.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org6457c74">
<h4 id="org6457c74">-A, –user-agent &lt;name&gt;</h4>
<div class="outline-text-4" id="text-org6457c74">
<p>
(HTTP)  Specify  the User-Agent string to send to the HTTP server. To encode blanks in the string, surround the string with single quote marks. This can also be
set with the -H, –header option of course.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org21dc71b">
<h4 id="org21dc71b">-u, –user &lt;user:password&gt;</h4>
<div class="outline-text-4" id="text-org21dc71b">
<p>
Specify the user name and password to use for server authentication. Overrides -n, –netrc and –netrc-optional.
</p>
<p>
If you simply specify the user name, curl will prompt for a password.
</p>
<p>
The user name and passwords are split up on the first colon, which makes it impossible to use a colon in the user name  with  this  option.  The  password  can,
still.
</p>
<p>
When using Kerberos V5 with a Windows based server you should include the Windows domain name in the user name, in order for the server to successfully obtain a
Kerberos Ticket. If you don't then the initial authentication handshake may fail.
</p>
<p>
When using NTLM, the user name can be specified simply as the user name, without the domain, if there is a single domain and forest in your setup for example.
</p>
<p>
To specify the domain name use either Down-Level Logon Name or UPN (User Principal Name) formats. For example, EXAMPLE\user and user@example.com respectively.
</p>
<p>
If you use a Windows SSPI-enabled curl binary and perform Kerberos V5, Negotiate, NTLM or Digest authentication then you can tell curl to select the  user  name
and password from your environment by specifying a single colon with this option: "-u :".
</p>
<p>
If this option is used several times, the last one will be used.
</p>
</div>
</div>
<div class="outline-4" id="outline-container-org7e3e82e">
<h4 id="org7e3e82e">-v, –verbose</h4>
<div class="outline-text-4" id="text-org7e3e82e">
<p>
Makes  curl verbose during the operation. Useful for debugging and seeing what's going on "under the hood". A line starting with '&gt;' means "header data" sent by
curl, '&lt;' means "header data" received by curl that is hidden in normal cases, and a line starting with '*' means additional info provided by curl.
</p>
<p>
If you only want HTTP headers in the output, -i, –include might be the option you're looking for.
</p>
<p>
If you think this option still doesn't give you enough details, consider using –trace or –trace-ascii instead.
</p>
<p>
Use -s, –silent to make curl really quiet.
</p>
<p>
See also -i, –include. This option overrides –trace and –trace-ascii.
</p>
<p>
-V, –version
Displays information about curl and the libcurl version it uses.
</p>
<p>
The first line includes the full version of curl, libcurl and other 3rd party libraries linked with the executable.
</p>
<p>
The second line (starts with "Protocols:") shows all protocols that libcurl reports to support.
</p>
<p>
The third line (starts with "Features:") shows specific features libcurl reports to offer. Available features include:
</p>
<p>
IPv6   You can use IPv6 with this.
</p>
<p>
krb4   Krb4 for FTP is supported.
</p>
<p>
SSL    SSL versions of various protocols are supported, such as HTTPS, FTPS, POP3S and so on.
</p>
<p>
libz   Automatic decompression of compressed files over HTTP is supported.
</p>
<p>
NTLM   NTLM authentication is supported.
</p>
<p>
Debug  This curl uses a libcurl built with Debug. This enables more error-tracking and memory debugging etc. For curl-developers only!
</p>
<p>
AsynchDNS
This curl uses asynchronous name resolves. Asynchronous name resolves can be done using either the c-ares or the threaded resolver backends.
</p>
<p>
SPNEGO SPNEGO authentication is supported.
</p>
<p>
Largefile
This curl supports transfers of large files, files larger than 2GB.
</p>
<p>
IDN    This curl supports IDN - international domain names.
</p>
<p>
GSS-API
GSS-API is supported.
</p>
<p>
SSPI   SSPI is supported.
</p>
<p>
TLS-SRP
SRP (Secure Remote Password) authentication is supported for TLS.
</p>
<p>
HTTP2  HTTP/2 support has been built-in.
</p>
<p>
UnixSockets
Unix sockets support is provided.
</p>
<p>
HTTPS-proxy
This curl is built to support HTTPS proxy.
</p>
<p>
Metalink
This curl supports Metalink (both version 3 and 4 (RFC 5854)), which describes mirrors and hashes.  curl will use  mirrors  for  failover  if  there  are
errors (such as the file or server not being available).
</p>
<p>
PSL    PSL is short for Public Suffix List and means that this curl has been built with knowledge about "public suffixes".
</p>
</div>
</div>
<div class="outline-4" id="outline-container-orgb10f801">
<h4 id="orgb10f801">-w, –write-out &lt;format&gt;</h4>
<div class="outline-text-4" id="text-orgb10f801">
<p>
Make  curl  display information on stdout after a completed transfer. The format is a string that may contain plain text mixed with any number of variables. The
format can be specified as a literal "string", or you can have curl read the format from a file with "@filename" and to tell curl to read the format from  stdin
you write "@-".
</p>
<p>
The  variables  present  in  the output format will be substituted by the value or text that curl thinks fit, as described below. All variables are specified as
%{variable_name} and to output a normal % you just write them as %%. You can output a newline by using \n, a carriage return with \r and a tab space with \t.
</p>
<p>
NOTE: The %-symbol is a special symbol in the win32-environment, where all occurrences of % must be doubled when using this option.
</p>
<p>
The variables available are:
</p>
<p>
content_type   The Content-Type of the requested document, if there was any.
</p>
<p>
filename_effective
The ultimate filename that curl writes out to. This is only meaningful if curl is told to write to a file  with  the  -O,  –remote-name  or  -o,
                             –output option. It's most useful in combination with the -J, –remote-header-name option. (Added in 7.26.0)
</p>
<p>
ftp_entry_path The initial path curl ended up in when logging on to the remote FTP server. (Added in 7.15.4)
</p>
<p>
http_code      The  numerical response code that was found in the last retrieved HTTP(S) or FTP(s) transfer. In 7.18.2 the alias response_code was added to show
	       the same info.
</p>
<p>
http_connect   The numerical code that was found in the last response (from a proxy) to a curl CONNECT request. (Added in 7.12.4)
</p>
<p>
http_version   The http version that was effectively used. (Added in 7.50.0)
</p>
<p>
local_ip       The IP address of the local end of the most recently done connection - can be either IPv4 or IPv6 (Added in 7.29.0)
</p>
<p>
local_port     The local port number of the most recently done connection (Added in 7.29.0)
</p>
<p>
num_connects   Number of new connects made in the recent transfer. (Added in 7.12.3)
</p>
<p>
num_redirects  Number of redirects that were followed in the request. (Added in 7.12.3)
</p>
<p>
proxy_ssl_verify_result
	       The result of the HTTPS proxy's SSL peer certificate verification that was requested. 0 means the verification was successful. (Added in 7.52.0)
</p>
<p>
redirect_url   When an HTTP request was made without -L, –location to follow redirects (or when –max-redir is met), this variable will show the actual  URL  a
	       redirect would have gone to. (Added in 7.18.2)
</p>
<p>
remote_ip      The remote IP address of the most recently done connection - can be either IPv4 or IPv6 (Added in 7.29.0)
</p>
<p>
remote_port    The remote port number of the most recently done connection (Added in 7.29.0)
</p>
<p>
scheme         The URL scheme (sometimes called protocol) that was effectively used (Added in 7.52.0)
</p>
<p>
size_download  The total amount of bytes that were downloaded.
</p>
<p>
size_header    The total amount of bytes of the downloaded headers.
</p>
<p>
size_request   The total amount of bytes that were sent in the HTTP request.
</p>
<p>
size_upload    The total amount of bytes that were uploaded.
</p>
<p>
speed_download The average download speed that curl measured for the complete download. Bytes per second.
</p>
<p>
speed_upload   The average upload speed that curl measured for the complete upload. Bytes per second.
</p>
<p>
ssl_verify_result
	       The result of the SSL peer certificate verification that was requested. 0 means the verification was successful. (Added in 7.19.0)
</p>
<p>
time_appconnect
	       The time, in seconds, it took from the start until the SSL/SSH/etc connect/handshake to the remote host was completed. (Added in 7.19.0)
</p>
<p>
time_connect   The time, in seconds, it took from the start until the TCP connect to the remote host (or proxy) was completed.
</p>
<p>
time_namelookup
	       The time, in seconds, it took from the start until the name resolving was completed.
</p>
<p>
time_pretransfer
	       The time, in seconds, it took from the start until the file transfer was just about to begin. This includes all pre-transfer commands and negoti‐
	       ations that are specific to the particular protocol(s) involved.
</p>
<p>
time_redirect  The time, in seconds, it took for all redirection steps including name lookup, connect, pretransfer and transfer before the final transaction was
	       started. time_redirect shows the complete execution time for multiple redirections. (Added in 7.12.3)
</p>
<p>
time_starttransfer
	       The  time,  in seconds, it took from the start until the first byte was just about to be transferred. This includes time_pretransfer and also the
	       time the server needed to calculate the result.
</p>
<p>
time_total     The total time, in seconds, that the full operation lasted.
</p>
<p>
url_effective  The URL that was fetched last. This is most meaningful if you've told curl to follow location: headers.
</p>
<p>
If this option is used several times, the last one will be used.
</p>
<p>
–xattr
       When saving output to a file, this option tells curl to store certain file metadata in extended file attributes. Currently, the URL is stored  in  the  xdg.ori‐
       gin.url  attribute  and,  for HTTP, the content type is stored in the mime_type attribute. If the file system does not support extended attributes, a warning is
       issued.
</p>
</div>
</div>
</div>
<div class="outline-3" id="outline-container-orgb7c285a">
<h3 id="orgb7c285a">相关的文件</h3>
<div class="outline-text-3" id="text-orgb7c285a">
<p>
~/.curlrc
       Default config file, see -K, –config for details.
</p>
</div>
</div>
<div class="outline-3" id="outline-container-orgb4eb049">
<h3 id="orgb4eb049">环境变量</h3>
<div class="outline-text-3" id="text-orgb4eb049">
<p>
The environment variables can be specified in lower case or upper case. The lower case version has precedence. http_proxy is an exception as it is  only  available  in
lower case.
</p>
<p>
Using an environment variable to set the proxy has the same effect as using the -x, –proxy option.
</p>
<p>
http_proxy [protocol://]&lt;host&gt;[:port]
       Sets the proxy server to use for HTTP.
</p>
<p>
HTTPS_PROXY [protocol://]&lt;host&gt;[:port]
       Sets the proxy server to use for HTTPS.
</p>
<p>
[url-protocol]_PROXY [protocol://]&lt;host&gt;[:port]
       Sets  the  proxy  server  to use for [url-protocol], where the protocol is a protocol that curl supports and as specified in a URL. FTP, FTPS, POP3, IMAP, SMTP,
       LDAP etc.
</p>
<p>
ALL_PROXY [protocol://]&lt;host&gt;[:port]
       Sets the proxy server to use if no protocol-specific proxy is set.
</p>
<p>
NO_PROXY &lt;comma-separated list of hosts&gt;
       list of host names that shouldn't go through any proxy. If set to a asterisk '*' only, it matches all hosts.
</p>
<p>
Since 7.53.0, this environment variable disable the proxy even if specify -x, –proxy option. That is  NO_PROXY=direct.example.com  curl  -x  <a href="http://proxy.exam">http://proxy.exam</a>‐
ple.com  <a href="http://direct.example.com">http://direct.example.com</a>  accesses  the  target  URL directly, and NO_PROXY=direct.example.com curl -x <a href="http://proxy.example.com">http://proxy.example.com</a> <a href="http://somewhere.exam">http://somewhere.exam</a>‐
ple.com accesses the target URL through proxy.
</p>
</div>
</div>
<div class="outline-3" id="outline-container-orgcfcf2fc">
<h3 id="orgcfcf2fc">PROXY PROTOCOL PREFIXES</h3>
<div class="outline-text-3" id="text-orgcfcf2fc">
<p>
Since curl version 7.21.7, the proxy string may be specified with a protocol:// prefix to specify alternative proxy protocols.
</p>
<p>
If no protocol is specified in the proxy string or if the string doesn't match a supported one, the proxy will be treated as an HTTP proxy.
</p>
<p>
The supported proxy protocol prefixes are as follows:
</p>
<p>
<a href="http://">http://</a>
       Makes it use it as a HTTP proxy. The default if no scheme prefix is used.
</p>
<p>
<a href="https://">https://</a>
       Makes it treated as a HTTPS proxy.
</p>
<p>
socks4://
       Makes it the equivalent of –socks4
</p>
<p>
socks4a://
       Makes it the equivalent of –socks4a
</p>
<p>
socks5://
       Makes it the equivalent of –socks5
</p>
<p>
socks5h://
       Makes it the equivalent of –socks5-hostname
</p>
</div>
</div>
<div class="outline-3" id="outline-container-orgda216e6">
<h3 id="orgda216e6">EXIT CODES</h3>
<div class="outline-text-3" id="text-orgda216e6">
<p>
There are a bunch of different error codes and their corresponding error messages that may appear during bad conditions. At the time of this writing,  the  exit  codes
are:
</p>
<p>
1      Unsupported protocol. This build of curl has no support for this protocol.
</p>
<p>
2      Failed to initialize.
</p>
<p>
3      URL malformed. The syntax was not correct.
</p>
<p>
4      A  feature  or option that was needed to perform the desired request was not enabled or was explicitly disabled at build-time. To make curl able to do this, you
       probably need another build of libcurl!
</p>
<p>
5      Couldn't resolve proxy. The given proxy host could not be resolved.
</p>
<p>
6      Couldn't resolve host. The given remote host was not resolved.
</p>
<p>
7      Failed to connect to host.
</p>
<p>
8      Weird server reply. The server sent data curl couldn't parse.
</p>
<p>
9      FTP access denied. The server denied login or denied access to the particular resource or directory you wanted to reach. Most often you tried  to  change  to  a
       directory that doesn't exist on the server.
</p>
<p>
10     FTP  accept failed. While waiting for the server to connect back when an active FTP session is used, an error code was sent over the control connection or simi‐
       lar.
</p>
<p>
11     FTP weird PASS reply. Curl couldn't parse the reply sent to the PASS request.
</p>
<p>
12     During an active FTP session while waiting for the server to connect back to curl, the timeout expired.
</p>
<p>
13     FTP weird PASV reply, Curl couldn't parse the reply sent to the PASV request.
</p>
<p>
14     FTP weird 227 format. Curl couldn't parse the 227-line the server sent.
</p>
<p>
15     FTP can't get host. Couldn't resolve the host IP we got in the 227-line.
</p>
<p>
16     HTTP/2 error. A problem was detected in the HTTP2 framing layer. This is somewhat generic and can be one out of several problems,  see  the  error  message  for
       details.
</p>
<p>
17     FTP couldn't set binary. Couldn't change transfer method to binary.
</p>
<p>
18     Partial file. Only a part of the file was transferred.
</p>
<p>
19     FTP couldn't download/access the given file, the RETR (or similar) command failed.
</p>
<p>
21     FTP quote error. A quote command returned error from the server.
</p>
<p>
22     HTTP page not retrieved. The requested url was not found or returned another error with the HTTP error code being 400 or above. This return code only appears if
       -f, –fail is used.
</p>
<p>
23     Write error. Curl couldn't write data to a local filesystem or similar.
</p>
<p>
25     FTP couldn't STOR file. The server denied the STOR operation, used for FTP uploading.
</p>
<p>
26     Read error. Various reading problems.
</p>
<p>
27     Out of memory. A memory allocation request failed.
</p>
<p>
28     Operation timeout. The specified time-out period was reached according to the conditions.
</p>
<p>
30     FTP PORT failed. The PORT command failed. Not all FTP servers support the PORT command, try doing a transfer using PASV instead!
</p>
<p>
31     FTP couldn't use REST. The REST command failed. This command is used for resumed FTP transfers.
</p>
<p>
33     HTTP range error. The range "command" didn't work.
</p>
<p>
34     HTTP post error. Internal post-request generation error.
</p>
<p>
35     SSL connect error. The SSL handshaking failed.
</p>
<p>
36     Bad download resume. Couldn't continue an earlier aborted download.
</p>
<p>
37     FILE couldn't read file. Failed to open the file. Permissions?
</p>
<p>
38     LDAP cannot bind. LDAP bind operation failed.
</p>
<p>
39     LDAP search failed.
</p>
<p>
41     Function not found. A required LDAP function was not found.
</p>
<p>
42     Aborted by callback. An application told curl to abort the operation.
</p>
<p>
43     Internal error. A function was called with a bad parameter.
</p>
<p>
45     Interface error. A specified outgoing interface could not be used.
</p>
<p>
47     Too many redirects. When following redirects, curl hit the maximum amount.
</p>
<p>
48     Unknown option specified to libcurl. This indicates that you passed a weird option to curl that was passed on to libcurl and rejected. Read up in the manual!
</p>
<p>
49     Malformed telnet option.
</p>
<p>
51     The peer's SSL certificate or SSH MD5 fingerprint was not OK.
</p>
<p>
52     The server didn't reply anything, which here is considered an error.
</p>
<p>
53     SSL crypto engine not found.
</p>
<p>
54     Cannot set SSL crypto engine as default.
</p>
<p>
55     Failed sending network data.
</p>
<p>
56     Failure in receiving network data.
</p>
<p>
58     Problem with the local certificate.
</p>
<p>
59     Couldn't use specified SSL cipher.
</p>
<p>
60     Peer certificate cannot be authenticated with known CA certificates.
</p>
<p>
61     Unrecognized transfer encoding.
</p>
<p>
62     Invalid LDAP URL.
</p>
<p>
63     Maximum file size exceeded.
</p>
<p>
64     Requested FTP SSL level failed.
</p>
<p>
65     Sending the data requires a rewind that failed.
</p>
<p>
66     Failed to initialise SSL Engine.
</p>
<p>
67     The user name, password, or similar was not accepted and curl failed to log in.
</p>
<p>
68     File not found on TFTP server.
</p>
<p>
69     Permission problem on TFTP server.
</p>
<p>
70     Out of disk space on TFTP server.
</p>
<p>
71     Illegal TFTP operation.
</p>
<p>
72     Unknown TFTP transfer ID.
</p>
<p>
73     File already exists (TFTP).
</p>
<p>
74     No such user (TFTP).
</p>
<p>
75     Character conversion failed.
</p>
<p>
76     Character conversion functions required.
</p>
<p>
77     Problem with reading the SSL CA cert (path? access rights?).
</p>
<p>
78     The resource referenced in the URL does not exist.
</p>
<p>
79     An unspecified error occurred during the SSH session.
</p>
<p>
80     Failed to shut down the SSL connection.
</p>
<p>
82     Could not load CRL file, missing or wrong format (added in 7.19.0).
</p>
<p>
83     Issuer check failed (added in 7.19.0).
</p>
<p>
84     The FTP PRET command failed
</p>
<p>
85     RTSP: mismatch of CSeq numbers
</p>
<p>
86     RTSP: mismatch of Session Identifiers
</p>
<p>
87     unable to parse FTP file list
</p>
<p>
88     FTP chunk callback reported error
</p>
<p>
89     No connection available, the session will be queued
</p>
<p>
90     SSL public key does not matched pinned public key
</p>
<p>
91     Invalid SSL certificate status.
</p>
<p>
92     Stream error in HTTP/2 framing layer.
</p>
<p>
XX     More error codes will appear here in future releases. The existing ones are meant to never change.
</p>
</div>
</div>
<div class="outline-3" id="outline-container-orgd7c5e01">
<h3 id="orgd7c5e01">AUTHORS / CONTRIBUTORS</h3>
<div class="outline-text-3" id="text-orgd7c5e01">
<p>
Daniel Stenberg is the main author, but the whole list of contributors is found in the separate THANKS file.
</p>
</div>
</div>
<div class="outline-3" id="outline-container-orga12b23c">
<h3 id="orga12b23c">WWW</h3>
<div class="outline-text-3" id="text-orga12b23c">
<p>
<a href="https://curl.haxx.se">https://curl.haxx.se</a>
</p>
</div>
</div>
<div class="outline-3" id="outline-container-org3d1dd79">
<h3 id="org3d1dd79">SEE ALSO</h3>
<div class="outline-text-3" id="text-org3d1dd79">
<p>
ftp(1), wget(1)
</p>
</div>
</div>
<div class="outline-3" id="outline-container-org10887d3">
<h3 id="org10887d3">Footer</h3>
<div class="outline-text-3" id="text-org10887d3">
<p>
Curl 7.58.0                                                                    November 16, 2016                                                                       curl(1)
</p>
</div>
</div>
</div>
</div>
<div class="status" id="postamble">
<p class="author">Author: gdme1320</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
